Ensure classes are defined in their own files

Ensure that all classes are defined in their own files. Mostly classes
have been changed to inner-types.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-27 11:28:04 -07:00
committed by Rob Winch
parent 053af720a4
commit f1cee9500f
15 changed files with 599 additions and 567 deletions

View File

@@ -82,20 +82,20 @@ public class SecuredAnnotationSecurityMetadataSource extends AbstractFallbackMet
return this.annotationExtractor.extractAttributes(a);
}
}
static class SecuredAnnotationMetadataExtractor implements AnnotationMetadataExtractor<Secured> {
class SecuredAnnotationMetadataExtractor implements AnnotationMetadataExtractor<Secured> {
@Override
public Collection<ConfigAttribute> extractAttributes(Secured secured) {
String[] attributeTokens = secured.value();
List<ConfigAttribute> attributes = new ArrayList<>(attributeTokens.length);
@Override
public Collection<ConfigAttribute> extractAttributes(Secured secured) {
String[] attributeTokens = secured.value();
List<ConfigAttribute> attributes = new ArrayList<>(attributeTokens.length);
for (String token : attributeTokens) {
attributes.add(new SecurityConfig(token));
}
for (String token : attributeTokens) {
attributes.add(new SecurityConfig(token));
return attributes;
}
return attributes;
}
}

View File

@@ -69,19 +69,19 @@ public class AbstractSecurityExpressionHandlerTests {
assertThat(parser == this.handler.getExpressionParser()).isTrue();
}
}
@Configuration
static class TestConfiguration {
@Configuration
class TestConfiguration {
@Bean
Integer number10() {
return 10;
}
@Bean
Integer number10() {
return 10;
}
@Bean
Integer number20() {
return 20;
}
@Bean
Integer number20() {
return 20;
}
}

View File

@@ -42,20 +42,20 @@ public class FieldUtilsTests {
}
}
}
@SuppressWarnings("unused")
static class TestClass {
@SuppressWarnings("unused")
class TestClass {
private String protectedField = "x";
private String protectedField = "x";
private Nested nested = new Nested();
private Nested nested = new Nested();
}
@SuppressWarnings("unused")
class Nested {
private String protectedField = "z";
}
@SuppressWarnings("unused")
static class Nested {
private String protectedField = "z";
}
}