GH-1082 - ApplicationModuleSource now uses JavaPackage.findAnnotation(…).
This is to make sure that marker types annotated with @PackageInfo are considered, too. Deprecate JavaPackage.getAnnotation(…) as it's not used anywhere anymore and we would like to consistently consider package info marker types when looking up package annotations.
This commit is contained in:
@@ -53,7 +53,7 @@ class JavaPackageUnitTests {
|
||||
void findsAnnotationOnPackageInfo() {
|
||||
|
||||
var annotation = JavaPackage.of(Classes.of(PKG_CLASSES), "pkg.onpackage") //
|
||||
.getAnnotation(ApplicationModule.class);
|
||||
.findAnnotation(ApplicationModule.class);
|
||||
|
||||
assertThat(annotation).hasValueSatisfying(it -> {
|
||||
assertThat(it.displayName()).isEqualTo("onPackage");
|
||||
|
||||
Reference in New Issue
Block a user