Skip to content

Throw a meaningful exception if a TypeReference does not use a fully qualified name #28213

Closed
@sdeleuze

Description

@sdeleuze

TypeReference.of("int") fails because a dot is expected in the type name.

begin 0, end -1, length 3
java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 3
	at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4601)
	at java.base/java.lang.String.substring(String.java:2704)
	at org.springframework.aot.hint.SimpleTypeReference.createTypeReference(SimpleTypeReference.java:60)
	at org.springframework.aot.hint.SimpleTypeReference.of(SimpleTypeReference.java:48)
	at org.springframework.aot.hint.TypeReference.of(TypeReference.java:75)

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions