Skip to content

TypeDescriptor#getElementTypeDescriptor does not throw IllegalStateException anymore #23996

@michael-simons

Description

@michael-simons

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.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions