Migrate and verify annotation utility methods
Migrate all possible `AnnotationUtils` and `AnnotatedElementUtils` method to the `MergedAnnotation` API, verify results against the old implementations. All migrated methods now call both the new API and the old version and ensure that the same results or exceptions are raised. A full build of both Spring Framework and Spring Boot has been executed to ensure, as much as possible, that the migration does not cause unexpected regressions. See gh-22562
This commit is contained in:
committed by
Juergen Hoeller
parent
b91ccf038f
commit
a14bfe9a21
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -79,7 +79,8 @@ public class SqlScriptsTestExecutionListenerTests {
|
||||
containsString("attribute 'scripts' and its alias 'value'")));
|
||||
exception.expectMessage(either(containsString("values of [{foo}] and [{bar}]")).or(
|
||||
containsString("values of [{bar}] and [{foo}]")));
|
||||
exception.expectMessage(containsString("but only one is permitted"));
|
||||
exception.expectMessage(either(containsString("but only one is permitted")).or(
|
||||
containsString("Different @AliasFor mirror values")));
|
||||
listener.beforeTestMethod(testContext);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -73,7 +73,9 @@ public class ContextLoaderUtilsConfigurationAttributesTests extends AbstractCont
|
||||
exception.expectMessage(either(
|
||||
containsString("values of [{x}] and [{y}]")).or(
|
||||
containsString("values of [{y}] and [{x}]")));
|
||||
exception.expectMessage(containsString("but only one is permitted"));
|
||||
exception.expectMessage(either(
|
||||
containsString("Different @AliasFor mirror values")).or(
|
||||
containsString("but only one is permitted")));
|
||||
resolveContextConfigurationAttributes(ConflictingLocations.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user