Browse Source

Polish

pull/7469/merge
Phillip Webb 9 years ago
parent
commit
102da8b3c6
  1. 10
      spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
  2. 4
      spring-boot/src/main/java/org/springframework/boot/diagnostics/AbstractFailureAnalyzer.java
  3. 2
      spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java

10
spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

@ -140,8 +140,8 @@ import org.springframework.web.context.support.StandardServletEnvironment; @@ -140,8 +140,8 @@ import org.springframework.web.context.support.StandardServletEnvironment;
* Configuration properties are also bound to the {@link SpringApplication}. This makes it
* possible to set {@link SpringApplication} properties dynamically, like the sources
* ("spring.main.sources" - a CSV list) the flag to indicate a web environment
* ("spring.main.web_environment=true") or the flag to switch off the banner
* ("spring.main.show_banner=false").
* ("spring.main.web-application-type=none") or the flag to switch off the banner
* ("spring.main.banner-mode=off").
*
* @author Phillip Webb
* @author Dave Syer
@ -340,7 +340,8 @@ public class SpringApplication { @@ -340,7 +340,8 @@ public class SpringApplication {
bindToSpringApplication(environment);
Banner printedBanner = printBanner(environment);
context = createApplicationContext();
exceptionReporters = getSpringFactoriesInstances(SpringBootExceptionReporter.class,
exceptionReporters = getSpringFactoriesInstances(
SpringBootExceptionReporter.class,
new Class[] { ConfigurableApplicationContext.class }, context);
prepareContext(context, environment, listeners, applicationArguments,
printedBanner);
@ -854,7 +855,8 @@ public class SpringApplication { @@ -854,7 +855,8 @@ public class SpringApplication {
private void handleRunFailure(ConfigurableApplicationContext context,
SpringApplicationRunListeners listeners,
Collection<SpringBootExceptionReporter> exceptionReporters, Throwable exception) {
Collection<SpringBootExceptionReporter> exceptionReporters,
Throwable exception) {
try {
try {
handleExitCode(context, exception);

4
spring-boot/src/main/java/org/springframework/boot/diagnostics/AbstractFailureAnalyzer.java

@ -59,10 +59,10 @@ public abstract class AbstractFailureAnalyzer<T extends Throwable> @@ -59,10 +59,10 @@ public abstract class AbstractFailureAnalyzer<T extends Throwable>
}
@SuppressWarnings("unchecked")
protected final <E extends Throwable> T findCause(Throwable failure, Class<E> type) {
protected final <E extends Throwable> E findCause(Throwable failure, Class<E> type) {
while (failure != null) {
if (type.isInstance(failure)) {
return (T) failure;
return (E) failure;
}
failure = failure.getCause();
}

2
spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java vendored

@ -33,7 +33,7 @@ import org.springframework.util.Assert; @@ -33,7 +33,7 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* Utility that can be used to {@link MutablePropertySources} using
* Utility that can be used update {@link MutablePropertySources} using
* {@link PropertySourceLoader}s.
*
* @author Phillip Webb

Loading…
Cancel
Save