File tree 2 files changed +7
-5
lines changed
spring-context/src/test/java/org/springframework/context/annotation
spring-web/src/main/java/org/springframework/web/util
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -290,19 +290,22 @@ public ExampleBean bean1() {
290
290
@ Never
291
291
@ Import ({ConfigurationNotCreated .class , RegistrarNotCreated .class , ImportSelectorNotCreated .class })
292
292
static class ImportsNotCreated {
293
+
293
294
static {
294
295
if (true ) throw new RuntimeException ();
295
296
}
296
297
}
297
298
298
299
@ Configuration
299
300
static class ConfigurationNotCreated {
301
+
300
302
static {
301
303
if (true ) throw new RuntimeException ();
302
304
}
303
305
}
304
306
305
307
static class RegistrarNotCreated implements ImportBeanDefinitionRegistrar {
308
+
306
309
static {
307
310
if (true ) throw new RuntimeException ();
308
311
}
Original file line number Diff line number Diff line change @@ -154,16 +154,15 @@ public static void setWebAppRootSystemProperty(ServletContext servletContext) th
154
154
String root = servletContext .getRealPath ("/" );
155
155
if (root == null ) {
156
156
throw new IllegalStateException (
157
- "Cannot set web app root system property when WAR file is not expanded" );
157
+ "Cannot set web app root system property when WAR file is not expanded" );
158
158
}
159
159
String param = servletContext .getInitParameter (WEB_APP_ROOT_KEY_PARAM );
160
160
String key = (param != null ? param : DEFAULT_WEB_APP_ROOT_KEY );
161
161
String oldValue = System .getProperty (key );
162
162
if (oldValue != null && !StringUtils .pathEquals (oldValue , root )) {
163
- throw new IllegalStateException (
164
- "Web app root system property already set to different value: '" +
165
- key + "' = [" + oldValue + "] instead of [" + root + "] - " +
166
- "Choose unique values for the 'webAppRootKey' context-param in your web.xml files!" );
163
+ throw new IllegalStateException ("Web app root system property already set to different value: '" +
164
+ key + "' = [" + oldValue + "] instead of [" + root + "] - " +
165
+ "Choose unique values for the 'webAppRootKey' context-param in your web.xml files!" );
167
166
}
168
167
System .setProperty (key , root );
169
168
servletContext .log ("Set web app root system property: '" + key + "' = [" + root + "]" );
You can’t perform that action at this time.
0 commit comments