Skip to content

Commit 4e96587

Browse files
committed
Polish modifier declaration ordering
Follow that Java language specification.
1 parent 64930d4 commit 4e96587

File tree

26 files changed

+31
-31
lines changed

26 files changed

+31
-31
lines changed

Diff for: spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public ModelAndView resolveException(HttpServletRequest request,
338338

339339
}
340340

341-
static abstract class AccessLogCustomizer<T extends EmbeddedServletContainerFactory>
341+
abstract static class AccessLogCustomizer<T extends EmbeddedServletContainerFactory>
342342
implements EmbeddedServletContainerCustomizer, Ordered {
343343

344344
private final Class<T> factoryClass;

Diff for: spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected void validateCrshShellConfig(Properties properties) {
190190
/**
191191
* Base class for CRaSH properties.
192192
*/
193-
public static abstract class CrshShellProperties {
193+
public abstract static class CrshShellProperties {
194194

195195
/**
196196
* Apply the properties to a CRaSH configuration.
@@ -203,7 +203,7 @@ public static abstract class CrshShellProperties {
203203
/**
204204
* Base class for Auth specific properties.
205205
*/
206-
public static abstract class CrshShellAuthenticationProperties
206+
public abstract static class CrshShellAuthenticationProperties
207207
extends CrshShellProperties {
208208

209209
}

Diff for: spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/DropwizardMetricServices.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public void reset(String name) {
199199
/**
200200
* Simple {@link Gauge} implementation to {@literal double} value.
201201
*/
202-
private final static class SimpleGauge implements Gauge<Double> {
202+
private static final class SimpleGauge implements Gauge<Double> {
203203

204204
private volatile double value;
205205

@@ -221,7 +221,7 @@ public void setValue(double value) {
221221
/**
222222
* Strategy used to register metrics.
223223
*/
224-
private static abstract class MetricRegistrar<T extends Metric> {
224+
private abstract static class MetricRegistrar<T extends Metric> {
225225

226226
private final Class<T> type;
227227

Diff for: spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointProxyTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public interface Executor {
100100

101101
}
102102

103-
public static abstract class AbstractExecutor implements Executor {
103+
public abstract static class AbstractExecutor implements Executor {
104104

105105
}
106106

Diff for: spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointVanillaIntegrationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void endpointsAllListed() throws Exception {
110110
if ("/actuator".equals(path)) {
111111
continue;
112112
}
113-
path = path.startsWith("/") ? path.substring(1) : path;
113+
path = (path.startsWith("/") ? path.substring(1) : path);
114114
this.mockMvc.perform(get("/actuator").accept(MediaType.APPLICATION_JSON))
115115
.andExpect(status().isOk())
116116
.andExpect(jsonPath("$._links.%s.href", path).exists());
@@ -126,7 +126,7 @@ public void endpointsEachHaveSelf() throws Exception {
126126
if (collections.contains(path)) {
127127
continue;
128128
}
129-
path = path.length() > 0 ? path : "/";
129+
path = (path.length() > 0 ? path : "/");
130130
this.mockMvc.perform(get(path).accept(MediaType.APPLICATION_JSON))
131131
.andExpect(status().isOk()).andExpect(jsonPath("$._links.self.href")
132132
.value("http://localhost" + endpoint.getPath()));

Diff for: spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/ElasticsearchHealthIndicatorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private <T> void assertDetail(Map<String, Object> details, String detail, T valu
164164
assertThat((T) details.get(detail)).isEqualTo(value);
165165
}
166166

167-
private final static class StubClusterHealthResponse extends ClusterHealthResponse {
167+
private static final class StubClusterHealthResponse extends ClusterHealthResponse {
168168

169169
private final ClusterHealthStatus status;
170170

Diff for: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public Set<Object> determineImports(AnnotationMetadata metadata) {
142142
/**
143143
* Wrapper for a package import.
144144
*/
145-
private final static class PackageImport {
145+
private static final class PackageImport {
146146

147147
private final String packageName;
148148

Diff for: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public EmbeddedMongoDependencyConfiguration() {
228228
* A workaround for the lack of a {@code toString} implementation on
229229
* {@code GenericFeatureAwareVersion}.
230230
*/
231-
private final static class ToStringFriendlyFeatureAwareVersion
231+
private static final class ToStringFriendlyFeatureAwareVersion
232232
implements IFeatureAwareVersion {
233233

234234
private final String version;

Diff for: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/PathBasedTemplateAvailabilityProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private boolean isTemplateAvailable(String view, ResourceLoader resourceLoader,
7777
return false;
7878
}
7979

80-
protected static abstract class TemplateAvailabilityProperties {
80+
protected abstract static class TemplateAvailabilityProperties {
8181

8282
private String prefix;
8383

Diff for: spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ public CacheManagerCustomizer<CaffeineCacheManager> caffeineCacheManagerCustomiz
11491149

11501150
}
11511151

1152-
static abstract class CacheManagerTestCustomizer<T extends CacheManager>
1152+
abstract static class CacheManagerTestCustomizer<T extends CacheManager>
11531153
implements CacheManagerCustomizer<T> {
11541154

11551155
private T cacheManager;

Diff for: spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisAutoConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ private AnnotationConfigApplicationContext doLoad(Class<?> config,
317317
return applicationContext;
318318
}
319319

320-
private final static class DestinationChecker {
320+
private static final class DestinationChecker {
321321

322322
private final JmsTemplate jmsTemplate;
323323

Diff for: spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jndi/TestableInitialContextFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private static TestableContext getContext() {
6464
return context;
6565
}
6666

67-
private final static class TestableContext extends InitialContext {
67+
private static final class TestableContext extends InitialContext {
6868

6969
private final Map<String, Object> bindings = new HashMap<String, Object>();
7070

Diff for: spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrServiceMetadata.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private Map<String, String> parseStringItems(JSONObject json) throws JSONExcepti
227227
return result;
228228
}
229229

230-
private final static class MetadataHolder<K, T> {
230+
private static final class MetadataHolder<K, T> {
231231

232232
private final Map<K, T> content;
233233

Diff for: spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/Connection.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Connection {
4343
private static final Pattern WEBSOCKET_KEY_PATTERN = Pattern
4444
.compile("^Sec-WebSocket-Key:(.*)$", Pattern.MULTILINE);
4545

46-
public final static String WEBSOCKET_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
46+
public static final String WEBSOCKET_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
4747

4848
private final Socket socket;
4949

Diff for: spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ public static Restarter getInstance() {
606606
* Set the restarter instance (useful for testing).
607607
* @param instance the instance to set
608608
*/
609-
final static void setInstance(Restarter instance) {
609+
static final void setInstance(Restarter instance) {
610610
synchronized (INSTANCE_MONITOR) {
611611
Restarter.instance = instance;
612612
}

Diff for: spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoader.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ public RestartClassLoader(ClassLoader parent, URL[] urls,
9191
}
9292
Method classLoadingLockMethod = ReflectionUtils.findMethod(ClassLoader.class,
9393
"getClassLoadingLock", String.class);
94-
this.classLoadingLockSupplier = classLoadingLockMethod != null
95-
? new StandardClassLoadingLockSupplier()
96-
: new Java6ClassLoadingLockSupplier();
94+
this.classLoadingLockSupplier = (classLoadingLockMethod != null
95+
? new StandardClassLoadingLockSupplier()
96+
: new Java6ClassLoadingLockSupplier());
9797
}
9898

9999
@Override

Diff for: spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/payload/HttpTunnelPayload.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class HttpTunnelPayload {
4545

4646
private static final int BUFFER_SIZE = 1024 * 100;
4747

48-
final protected static char[] HEX_CHARS = "0123456789ABCDEF".toCharArray();
48+
protected static final char[] HEX_CHARS = "0123456789ABCDEF".toCharArray();
4949

5050
private static final Log logger = LogFactory.getLog(HttpTunnelPayload.class);
5151

Diff for: spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/SilentExitExceptionHandlerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void preventsNonZeroExitCodeWhenAllOtherThreadsAreDaemonThreads() {
7676

7777
}
7878

79-
private static abstract class TestThread extends Thread {
79+
private abstract static class TestThread extends Thread {
8080

8181
private Throwable thrown;
8282

Diff for: spring-boot-test/src/main/java/org/springframework/boot/test/json/AbstractJsonMarshalTester.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ protected abstract T readObject(Reader reader, ResolvableType type)
356356
*
357357
* @param <M> The marshaller type
358358
*/
359-
protected static abstract class FieldInitializer<M> {
359+
protected abstract static class FieldInitializer<M> {
360360

361361
private final Class<?> testerClass;
362362

Diff for: spring-boot-test/src/test/java/org/springframework/boot/test/json/GsonTesterTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected AbstractJsonMarshalTester<Object> createTester(Class<?> resourceLoadCl
6666
new GsonBuilder().create());
6767
}
6868

69-
static abstract class InitFieldsBaseClass {
69+
abstract static class InitFieldsBaseClass {
7070

7171
public GsonTester<ExampleObject> base;
7272

Diff for: spring-boot-test/src/test/java/org/springframework/boot/test/json/JacksonTesterTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected AbstractJsonMarshalTester<Object> createTester(Class<?> resourceLoadCl
6464
return new JacksonTester<Object>(resourceLoadClass, type, new ObjectMapper());
6565
}
6666

67-
static abstract class InitFieldsBaseClass {
67+
abstract static class InitFieldsBaseClass {
6868

6969
public JacksonTester<ExampleObject> base;
7070

Diff for: spring-boot/src/main/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected Check[] getChecks() {
7272
/**
7373
* {@link BeanDefinitionRegistryPostProcessor} to report warnings.
7474
*/
75-
protected final static class ConfigurationWarningsPostProcessor
75+
protected static final class ConfigurationWarningsPostProcessor
7676
implements PriorityOrdered, BeanDefinitionRegistryPostProcessor {
7777

7878
private Check[] checks;

Diff for: spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ public int getPort() {
354354
/**
355355
* An active Undertow port.
356356
*/
357-
private final static class Port {
357+
private static final class Port {
358358

359359
private final int number;
360360

Diff for: spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ private interface RequestFactoryCustomizer {
642642
/**
643643
* {@link RequestFactoryCustomizer} to call a "set timeout" method.
644644
*/
645-
private static abstract class TimeoutRequestFactoryCustomizer
645+
private abstract static class TimeoutRequestFactoryCustomizer
646646
implements RequestFactoryCustomizer {
647647

648648
private final int timeout;

Diff for: spring-boot/src/main/java/org/springframework/boot/yaml/SpringProfileDocumentMatcher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ enum ProfileType {
131131
/**
132132
* Base class for profile matchers.
133133
*/
134-
private static abstract class ProfilesMatcher {
134+
private abstract static class ProfilesMatcher {
135135

136136
public final MatchStatus matches(Set<String> profiles) {
137137
if (CollectionUtils.isEmpty(profiles)) {

Diff for: spring-boot/src/test/java/org/springframework/boot/jackson/JsonComponentModuleTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static class OnlyDeserializer extends NameAndAgeJsonComponent.Deserializer {
109109
@JsonComponent
110110
static class ComponentWithInnerAbstractClass {
111111

112-
private static abstract class AbstractSerializer
112+
private abstract static class AbstractSerializer
113113
extends NameAndAgeJsonComponent.Serializer {
114114

115115
}

0 commit comments

Comments
 (0)