Polishing

This commit is contained in:
Juergen Hoeller
2015-11-02 21:30:03 +01:00
parent c3dbaed4ce
commit 23c8f712c4
2 changed files with 13 additions and 14 deletions

View File

@@ -57,9 +57,18 @@ import static org.springframework.core.annotation.AnnotationUtils.*;
*/
public class AnnotationUtilsTests {
@Rule
public final ExpectedException exception = ExpectedException.none();
@Before
public void clearCachesBeforeTests() {
clearCaches();
}
static void clearCaches() {
clearCache("findAnnotationCache", "annotatedInterfaceCache", "metaPresentCache", "synthesizableCache",
"attributeAliasesCache", "attributeMethodsCache", "aliasDescriptorCache");
"attributeAliasesCache", "attributeMethodsCache", "aliasDescriptorCache");
}
static void clearCache(String... cacheNames) {
@@ -73,15 +82,6 @@ public class AnnotationUtilsTests {
}
@Rule
public final ExpectedException exception = ExpectedException.none();
@Before
public void clearCachesBeforeTests() {
clearCaches();
}
@Test
public void findMethodAnnotationOnLeaf() throws Exception {
Method m = Leaf.class.getMethod("annotatedOnLeaf");