You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refer to static nested classes, not static inner classes
Various parts of the reference manual as well as the Javadoc for
AnnotationConfigContextLoaderUtils improperly refer to "static inner
classes" even though this terminology does not exist in Java. The Java
Language Specification explicitly refers to such classes as "static
nested classes." An "inner class" must be non-static by definition.
Copy file name to clipboardExpand all lines: spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoaderUtils.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2002-2014 the original author or authors.
2
+
* Copyright 2002-2015 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ public abstract class AnnotationConfigContextLoaderUtils {
41
41
42
42
/**
43
43
* Detect the default configuration classes for the supplied test class.
44
-
* <p>The returned class array will contain all static inner classes of
44
+
* <p>The returned class array will contain all static nested classes of
45
45
* the supplied class that meet the requirements for {@code @Configuration}
46
46
* class implementations as specified in the documentation for
47
47
* {@link Configuration @Configuration}.
@@ -78,7 +78,7 @@ public static Class<?>[] detectDefaultConfigurationClasses(Class<?> declaringCla
78
78
if (configClasses.isEmpty()) {
79
79
if (logger.isInfoEnabled()) {
80
80
logger.info(String.format("Could not detect default configuration classes for test class [%s]: " +
81
-
"%s does not declare any static, non-private, non-final, inner classes " +
81
+
"%s does not declare any static, non-private, non-final, nested classes " +
82
82
"annotated with @Configuration.", declaringClass.getName(), declaringClass.getSimpleName()));
0 commit comments