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
The (current) documentation for all overloads of the getArrayComponentType method is:
/**
* If type is an array type, returns the annotated type of the component of the array.
* Otherwise, returns null.
*/
public static AnnotatedType getArrayComponentType(AnnotatedType type) {
// implementation
}
/**
* If type is an array type, returns the type of the component of the array.
* Otherwise, returns null.
*/
public static Type getArrayComponentType(Type type) {
// implementation
}
Based on my read, it should be safe to pass non-array Class objects to the method, and I would expect the method to return null when I do so.
Hopefully it's not presumptuous, but I have opened PR #33 with a proposed solution.
I hope this all made sense. If not, please don't hesitate to send me any questions or concerns!
The text was updated successfully, but these errors were encountered:
sigpwned
added a commit
to sigpwned/geantyref
that referenced
this issue
Nov 1, 2024
The following code fails under (current) master (and v1.3.16, and v2.0.0):
Specifically, it throws a
NullPointerException
.The (current) documentation for all overloads of the getArrayComponentType method is:
Based on my read, it should be safe to pass non-array
Class
objects to the method, and I would expect the method to returnnull
when I do so.Hopefully it's not presumptuous, but I have opened PR #33 with a proposed solution.
I hope this all made sense. If not, please don't hesitate to send me any questions or concerns!
The text was updated successfully, but these errors were encountered: