Add missing reflection hints on Jakarta types
This commit adds reflection hints for `jakarta.inject.Provider` and ensures that hints are always contributed even if jakarta classes are not on the classpath. Fixes gh-31259
This commit is contained in:
@@ -18,6 +18,7 @@ package org.springframework.beans.factory.annotation;
|
||||
|
||||
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.inject.Provider;
|
||||
import jakarta.inject.Qualifier;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -51,6 +52,11 @@ class JakartaAnnotationsRuntimeHintsTests {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(Inject.class)).accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
void jakartaProviderAnnotationHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(Provider.class)).accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
void jakartaQualifierAnnotationHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(Qualifier.class)).accepts(this.hints);
|
||||
|
||||
Reference in New Issue
Block a user