Browse Source

Polish

See gh-18665
pull/18848/head
xiaokeliu666 6 years ago committed by Stephane Nicoll
parent
commit
57c64eb3bc
  1. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/ContextIdApplicationContextInitializer.java
  2. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java
  3. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/InfoProperties.java
  4. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/java/JavaLoggingSystem.java
  5. 10
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java

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

@ -72,7 +72,7 @@ public class ContextIdApplicationContextInitializer
/** /**
* The ID of a context. * The ID of a context.
*/ */
class ContextId { static class ContextId {
private final AtomicLong children = new AtomicLong(0); private final AtomicLong children = new AtomicLong(0);

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

@ -248,7 +248,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
* {@link BeanFactoryPostProcessor} to re-order our property sources below any * {@link BeanFactoryPostProcessor} to re-order our property sources below any
* {@code @PropertySource} items added by the {@link ConfigurationClassPostProcessor}. * {@code @PropertySource} items added by the {@link ConfigurationClassPostProcessor}.
*/ */
private class PropertySourceOrderingPostProcessor implements BeanFactoryPostProcessor, Ordered { private static class PropertySourceOrderingPostProcessor implements BeanFactoryPostProcessor, Ordered {
private ConfigurableApplicationContext context; private ConfigurableApplicationContext context;

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

@ -121,7 +121,7 @@ public class InfoProperties implements Iterable<InfoProperties.Entry> {
/** /**
* Property entry. * Property entry.
*/ */
public final class Entry { public static final class Entry {
private final String key; private final String key;

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

@ -168,7 +168,7 @@ public class JavaLoggingSystem extends AbstractLoggingSystem {
this.configuredLoggers.clear(); this.configuredLoggers.clear();
} }
private final class ShutdownHandler implements Runnable { private static final class ShutdownHandler implements Runnable {
@Override @Override
public void run() { public void run() {

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

@ -279,12 +279,10 @@ public final class LambdaSafe {
* @param invoker the invoker used to invoke the callback * @param invoker the invoker used to invoke the callback
*/ */
public void invoke(Consumer<C> invoker) { public void invoke(Consumer<C> invoker) {
this.callbackInstances.forEach((callbackInstance) -> { this.callbackInstances.forEach((callbackInstance) -> invoke(callbackInstance, () -> {
invoke(callbackInstance, () -> { invoker.accept(callbackInstance);
invoker.accept(callbackInstance); return null;
return null; }));
});
});
} }
/** /**

Loading…
Cancel
Save