Browse Source

Polishing

pull/1489/head
Juergen Hoeller 7 years ago
parent
commit
ca0983cd85
  1. 3
      spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java
  2. 3
      spring-web/src/main/java/org/springframework/web/util/WebUtils.java

3
spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java

@ -290,6 +290,7 @@ public class ConfigurationClassWithConditionTests { @@ -290,6 +290,7 @@ public class ConfigurationClassWithConditionTests {
@Never
@Import({ConfigurationNotCreated.class, RegistrarNotCreated.class, ImportSelectorNotCreated.class})
static class ImportsNotCreated {
static {
if (true) throw new RuntimeException();
}
@ -297,12 +298,14 @@ public class ConfigurationClassWithConditionTests { @@ -297,12 +298,14 @@ public class ConfigurationClassWithConditionTests {
@Configuration
static class ConfigurationNotCreated {
static {
if (true) throw new RuntimeException();
}
}
static class RegistrarNotCreated implements ImportBeanDefinitionRegistrar {
static {
if (true) throw new RuntimeException();
}

3
spring-web/src/main/java/org/springframework/web/util/WebUtils.java

@ -160,8 +160,7 @@ public abstract class WebUtils { @@ -160,8 +160,7 @@ public abstract class WebUtils {
String key = (param != null ? param : DEFAULT_WEB_APP_ROOT_KEY);
String oldValue = System.getProperty(key);
if (oldValue != null && !StringUtils.pathEquals(oldValue, root)) {
throw new IllegalStateException(
"Web app root system property already set to different value: '" +
throw new IllegalStateException("Web app root system property already set to different value: '" +
key + "' = [" + oldValue + "] instead of [" + root + "] - " +
"Choose unique values for the 'webAppRootKey' context-param in your web.xml files!");
}

Loading…
Cancel
Save