Remove obsolete references to JUnit 4's ArrayComparisonFailure
See gh-23451
This commit is contained in:
@@ -36,7 +36,6 @@ import javax.annotation.meta.When;
|
|||||||
|
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.internal.ArrayComparisonFailure;
|
|
||||||
|
|
||||||
import org.springframework.core.annotation.AnnotationUtilsTests.ExtendsBaseClassWithGenericAnnotatedMethod;
|
import org.springframework.core.annotation.AnnotationUtilsTests.ExtendsBaseClassWithGenericAnnotatedMethod;
|
||||||
import org.springframework.core.annotation.AnnotationUtilsTests.ImplementsInterfaceWithGenericAnnotatedMethod;
|
import org.springframework.core.annotation.AnnotationUtilsTests.ImplementsInterfaceWithGenericAnnotatedMethod;
|
||||||
@@ -754,7 +753,7 @@ public class AnnotatedElementUtilsTests {
|
|||||||
assertWebMapping(WebController.class.getMethod("getMappedWithPathAttribute"));
|
assertWebMapping(WebController.class.getMethod("getMappedWithPathAttribute"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assertWebMapping(AnnotatedElement element) throws ArrayComparisonFailure {
|
private void assertWebMapping(AnnotatedElement element) {
|
||||||
WebMapping webMapping = findMergedAnnotation(element, WebMapping.class);
|
WebMapping webMapping = findMergedAnnotation(element, WebMapping.class);
|
||||||
assertThat(webMapping).isNotNull();
|
assertThat(webMapping).isNotNull();
|
||||||
assertThat(webMapping.value()).as("value attribute: ").isEqualTo(asArray("/test"));
|
assertThat(webMapping.value()).as("value attribute: ").isEqualTo(asArray("/test"));
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ import java.util.stream.Stream;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.internal.ArrayComparisonFailure;
|
|
||||||
|
|
||||||
import org.springframework.core.Ordered;
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.core.annotation.MergedAnnotation.Adapt;
|
import org.springframework.core.annotation.MergedAnnotation.Adapt;
|
||||||
@@ -664,7 +663,7 @@ public class MergedAnnotationsTests {
|
|||||||
WebController.class.getMethod("getMappedWithPathAttribute"));
|
WebController.class.getMethod("getMappedWithPathAttribute"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testGetWithTypeHierarchyWebMapping(AnnotatedElement element) throws ArrayComparisonFailure {
|
private void testGetWithTypeHierarchyWebMapping(AnnotatedElement element) {
|
||||||
MergedAnnotation<?> annotation = MergedAnnotations.from(element,
|
MergedAnnotation<?> annotation = MergedAnnotations.from(element,
|
||||||
SearchStrategy.TYPE_HIERARCHY).get(RequestMapping.class);
|
SearchStrategy.TYPE_HIERARCHY).get(RequestMapping.class);
|
||||||
assertThat(annotation.getStringArray("value")).containsExactly("/test");
|
assertThat(annotation.getStringArray("value")).containsExactly("/test");
|
||||||
|
|||||||
Reference in New Issue
Block a user