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)
Comment From: snicoll
Ignoring the exception, this is the expected behaviour. Fully qualified name is expected as an input here so it should be TypeReference.of("java.lang.int")
.