You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
The fluent-api plugin already generates vararg-based withXYZ() methods for
collection properties. This works fine in most cases, but when XJC generates
properties of type JAXBElement, you end up with a lot of compiler warning when
using the vararg method.
This is because JAXBElement is a generic type, and when you pass an object of a
generic type to a method with a vararg parameter, the compiler complains:
"a generic array is created for a varargs parameter"
It's a pointless and harmless warning, but you get a lot of them.
I suggest that the fluent-api plugin also generates a with...() method that
takes a single, non-vararg parameter, as a special case for the vararg version.
This would remove the warnings in cases where we only have a single object to
add to the collection.
If this wasn't auto-generated code, I wouldn't see it as worth the bother, but
it would many of my bindings less frustrating.
Environment
Operating System: All
Platform: All
Affected Versions
[current]
The text was updated successfully, but these errors were encountered:
The fluent-api plugin already generates vararg-based withXYZ() methods for
collection properties. This works fine in most cases, but when XJC generates
properties of type JAXBElement, you end up with a lot of compiler warning when
using the vararg method.
This is because JAXBElement is a generic type, and when you pass an object of a
generic type to a method with a vararg parameter, the compiler complains:
"a generic array is created for a varargs parameter"
It's a pointless and harmless warning, but you get a lot of them.
I suggest that the fluent-api plugin also generates a with...() method that
takes a single, non-vararg parameter, as a special case for the vararg version.
This would remove the warnings in cases where we only have a single object to
add to the collection.
If this wasn't auto-generated code, I wouldn't see it as worth the bother, but
it would many of my bindings less frustrating.
Environment
Operating System: All
Platform: All
Affected Versions
[current]
The text was updated successfully, but these errors were encountered: