Skip to content

Commit 57c64eb

Browse files
xiaokeliu666snicoll
authored andcommitted
Polish
See gh-18665
1 parent 29e288f commit 57c64eb

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ContextIdApplicationContextInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private String getApplicationId(ConfigurableEnvironment environment) {
7272
/**
7373
* The ID of a context.
7474
*/
75-
class ContextId {
75+
static class ContextId {
7676

7777
private final AtomicLong children = new AtomicLong(0);
7878

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public void setSearchNames(String names) {
248248
* {@link BeanFactoryPostProcessor} to re-order our property sources below any
249249
* {@code @PropertySource} items added by the {@link ConfigurationClassPostProcessor}.
250250
*/
251-
private class PropertySourceOrderingPostProcessor implements BeanFactoryPostProcessor, Ordered {
251+
private static class PropertySourceOrderingPostProcessor implements BeanFactoryPostProcessor, Ordered {
252252

253253
private ConfigurableApplicationContext context;
254254

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/InfoProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void remove() {
121121
/**
122122
* Property entry.
123123
*/
124-
public final class Entry {
124+
public static final class Entry {
125125

126126
private final String key;
127127

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/java/JavaLoggingSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public void cleanUp() {
168168
this.configuredLoggers.clear();
169169
}
170170

171-
private final class ShutdownHandler implements Runnable {
171+
private static final class ShutdownHandler implements Runnable {
172172

173173
@Override
174174
public void run() {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,10 @@ private Callbacks(Class<C> callbackType, Collection<? extends C> callbackInstanc
279279
* @param invoker the invoker used to invoke the callback
280280
*/
281281
public void invoke(Consumer<C> invoker) {
282-
this.callbackInstances.forEach((callbackInstance) -> {
283-
invoke(callbackInstance, () -> {
284-
invoker.accept(callbackInstance);
285-
return null;
286-
});
287-
});
282+
this.callbackInstances.forEach((callbackInstance) -> invoke(callbackInstance, () -> {
283+
invoker.accept(callbackInstance);
284+
return null;
285+
}));
288286
}
289287

290288
/**

0 commit comments

Comments
 (0)