The JavaDoc of TypeDescriptor#getElementTypeDescriptor states
@throws IllegalStateException if this type is not a {@code java.util.Collection} or array type
However, that is not the case:
public static void main(String...a) {
System.out.println(TypeDescriptor.valueOf(String.class).getElementTypeDescriptor());
System.out.println(TypeDescriptor.valueOf(String[].class).getElementTypeDescriptor());
}
This works without an exception.
I would provide a fix, if I knew what is wrong: The behaviour or only the JavaDoc.
The JavaDoc of
TypeDescriptor#getElementTypeDescriptorstatesHowever, that is not the case:
This works without an exception.
I would provide a fix, if I knew what is wrong: The behaviour or only the JavaDoc.