Merge branch '5.1.x'
This commit is contained in:
@@ -521,9 +521,9 @@ public class AnnotatedElementUtilsTests {
|
||||
Class<?> element = InvalidConventionBasedComposedContextConfigClass.class;
|
||||
assertThatExceptionOfType(AnnotationConfigurationException.class).isThrownBy(() ->
|
||||
getMergedAnnotationAttributes(element, ContextConfig.class))
|
||||
.withMessageContaining("Different @AliasFor mirror values for annotation")
|
||||
.withMessageContaining("attribute 'locations' and its alias 'value'")
|
||||
.withMessageContaining("values of [{requiredLocationsDeclaration}] and [{duplicateDeclaration}]");
|
||||
.withMessageContaining("Different @AliasFor mirror values for annotation")
|
||||
.withMessageContaining("attribute 'locations' and its alias 'value'")
|
||||
.withMessageContaining("values of [{requiredLocationsDeclaration}] and [{duplicateDeclaration}]");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -774,6 +774,12 @@ public class AnnotatedElementUtilsTests {
|
||||
assertThat(findMergedAnnotation(SpringAppConfigClass.class, Resource.class)).isEqualTo(SpringAppConfigClass.class.getAnnotation(Resource.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void javaxMetaAnnotationTypeViaFindMergedAnnotation() throws Exception {
|
||||
assertThat(findMergedAnnotation(ParametersAreNonnullByDefault.class, Nonnull.class)).isEqualTo(ParametersAreNonnullByDefault.class.getAnnotation(Nonnull.class));
|
||||
assertThat(findMergedAnnotation(ResourceHolder.class, Nonnull.class)).isEqualTo(ParametersAreNonnullByDefault.class.getAnnotation(Nonnull.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nullableAnnotationTypeViaFindMergedAnnotation() throws Exception {
|
||||
Method method = TransactionalServiceImpl.class.getMethod("doIt");
|
||||
@@ -1375,6 +1381,7 @@ public class AnnotatedElementUtilsTests {
|
||||
}
|
||||
|
||||
@Resource(name = "x")
|
||||
@ParametersAreNonnullByDefault
|
||||
static class ResourceHolder {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user