Skip to content

ClassFileAnnotationMetadata.fromTypeDescriptor(…) fails on Java 24 #34882

Closed
@mp911de

Description

@mp911de

Reproducer:

@NamedStoredProcedureQueries({ //
		@NamedStoredProcedureQuery(name = "Dummy.procedureWith1InputAnd1OutputParameterWithResultSetWithUpdate",
				procedureName = "procedure_in1_out0_return_rs_with_update",
				parameters = { @StoredProcedureParameter(type = void.class) }) //
})
public class Dummy {

}

new CachingMetadataReaderFactory().getMetadataReader("com.example.demo.Dummy").getAnnotationMetadata();

(Caused by type.void)

Caused by: java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 1
11:01:22  	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
11:01:22  	at java.base/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
11:01:22  	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
11:01:22  	at java.base/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
11:01:22  	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
11:01:22  	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
11:01:22  	at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
11:01:22  	at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4950)
11:01:22  	at java.base/java.lang.String.substring(String.java:2912)
11:01:22  	at org.springframework.core.type.classreading.ClassFileAnnotationMetadata.fromTypeDescriptor(ClassFileAnnotationMetadata.java:100)
11:01:22  	at org.springframework.core.type.classreading.ClassFileAnnotationMetadata.readAnnotationValue(ClassFileAnnotationMetadata.java:88)
11:01:22  	at org.springframework.core.type.classreading.ClassFileAnnotationMetadata.createMergedAnnotation(ClassFileAnnotationMetadata.java:65)
11:01:22  	at org.springframework.core.type.classreading.ClassFileAnnotationMetadata.readAnnotationValue(ClassFileAnnotationMetadata.java:85)
11:01:22  	at org.springframework.core.type.classreading.ClassFileAnnotationMetadata.lambda$parseArrayValue$0(ClassFileAnnotationMetadata.java:122)

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