Skip to content

Commit a9eefae

Browse files
committed
Merge pull request #12032 from igor-suhorukov
* pr/12032: Polish static final usage for constants
2 parents 94bbaa7 + e98b938 commit a9eefae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/status/ExitStatus.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,12 +29,12 @@ public final class ExitStatus {
2929
/**
3030
* Generic "OK" exit status with zero exit code and {@literal hangup=false}.
3131
*/
32-
public static ExitStatus OK = new ExitStatus(0, "OK");
32+
public static final ExitStatus OK = new ExitStatus(0, "OK");
3333

3434
/**
3535
* Generic "not OK" exit status with non-zero exit code and {@literal hangup=true}.
3636
*/
37-
public static ExitStatus ERROR = new ExitStatus(-1, "ERROR", true);
37+
public static final ExitStatus ERROR = new ExitStatus(-1, "ERROR", true);
3838

3939
private final int code;
4040

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/SpringApplicationJsonEnvironmentPostProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ public class SpringApplicationJsonEnvironmentPostProcessor
5959
/**
6060
* Name of the {@code spring.application.json} property.
6161
*/
62-
public static String SPRING_APPLICATION_JSON_PROPERTY = "spring.application.json";
62+
public static final String SPRING_APPLICATION_JSON_PROPERTY = "spring.application.json";
6363

6464
/**
6565
* Name of the {@code SPRING_APPLICATION_JSON} environment variable.
6666
*/
67-
public static String SPRING_APPLICATION_JSON_ENVIRONMENT_VARIABLE = "SPRING_APPLICATION_JSON";
67+
public static final String SPRING_APPLICATION_JSON_ENVIRONMENT_VARIABLE = "SPRING_APPLICATION_JSON";
6868

6969
private static final String SERVLET_ENVIRONMENT_CLASS = "org.springframework.web."
7070
+ "context.support.StandardServletEnvironment";
@@ -176,7 +176,7 @@ private static class JsonPropertySource extends MapPropertySource
176176
private final JsonPropertyValue propertyValue;
177177

178178
JsonPropertySource(JsonPropertyValue propertyValue, Map<String, Object> source) {
179-
super("spring.application.json", source);
179+
super(SPRING_APPLICATION_JSON_PROPERTY, source);
180180
this.propertyValue = propertyValue;
181181
}
182182

0 commit comments

Comments
 (0)