@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2013 the original author or authors .
* Copyright 2002 - 2018 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 .
@ -49,7 +49,7 @@ public class AnnotationTypeFilterTests {
@@ -49,7 +49,7 @@ public class AnnotationTypeFilterTests {
@Test
public void testInheritedAnnotationFromInterfaceDoesNotMatch ( ) throws Exception {
MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory ( ) ;
String classUnderTest = "org.springframework.core.type.AnnotationTypeFilterTests$SomeSubClassOf SomeComponentInterface" ;
String classUnderTest = "org.springframework.core.type.AnnotationTypeFilterTests$SomeClassWith SomeComponentInterface" ;
MetadataReader metadataReader = metadataReaderFactory . getMetadataReader ( classUnderTest ) ;
AnnotationTypeFilter filter = new AnnotationTypeFilter ( InheritedAnnotation . class ) ;
@ -61,7 +61,7 @@ public class AnnotationTypeFilterTests {
@@ -61,7 +61,7 @@ public class AnnotationTypeFilterTests {
@Test
public void testInheritedAnnotationFromBaseClassDoesMatch ( ) throws Exception {
MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory ( ) ;
String classUnderTest = "org.springframework.core.type.AnnotationTypeFilterTests$SomeSubC lassOfSomeComponent" ;
String classUnderTest = "org.springframework.core.type.AnnotationTypeFilterTests$SomeSubc lassOfSomeComponent" ;
MetadataReader metadataReader = metadataReaderFactory . getMetadataReader ( classUnderTest ) ;
AnnotationTypeFilter filter = new AnnotationTypeFilter ( InheritedAnnotation . class ) ;
@ -94,22 +94,21 @@ public class AnnotationTypeFilterTests {
@@ -94,22 +94,21 @@ public class AnnotationTypeFilterTests {
@Test
public void testMatchesInterfacesIfConfigured ( ) throws Exception {
MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory ( ) ;
String classUnderTest = "org.springframework.core.type.AnnotationTypeFilterTests$SomeComponentInterface" ;
String classUnderTest = "org.springframework.core.type.AnnotationTypeFilterTests$SomeClassWithSomeC omponentInterface" ;
MetadataReader metadataReader = metadataReaderFactory . getMetadataReader ( classUnderTest ) ;
AnnotationTypeFilter filter = new AnnotationTypeFilter ( InheritedAnnotation . class , false , true ) ;
assertTrue ( filter . match ( metadataReader , metadataReaderFactory ) ) ;
ClassloadingAssertions . assertClassNotLoaded ( classUnderTest ) ;
}
// We must use a standalone set of types to ensure that no one else is loading them
// and interfering with ClassloadingAssertions.assertClassNotLoaded()
@Inherited
private static @interface InheritedAnnotation {
private @interface InheritedAnnotation {
}
@ -119,21 +118,21 @@ public class AnnotationTypeFilterTests {
@@ -119,21 +118,21 @@ public class AnnotationTypeFilterTests {
@InheritedAnnotation
private static interface SomeComponentInterface {
private interface SomeComponentInterface {
}
@SuppressWarnings ( "unused" )
private static class SomeSubClassOf SomeComponentInterface implements SomeComponentInterface {
private static class SomeClassWith SomeComponentInterface implements Cloneable , SomeComponentInterface {
}
@SuppressWarnings ( "unused" )
private static class SomeSubC lassOfSomeComponent extends SomeComponent {
private static class SomeSubc lassOfSomeComponent extends SomeComponent {
}
private static @interface NonInheritedAnnotation {
private @interface NonInheritedAnnotation {
}