mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Simplify if-statements with instanceof checks
Closes gh-25449
This commit is contained in:
+1
-1
@@ -181,7 +181,7 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
|
||||
|
||||
// If the WebApplicationContext has no parent or the parent is not a WebApplicationContext,
|
||||
// set the current context as the root WebApplicationContext:
|
||||
if (parent == null || (!(parent instanceof WebApplicationContext))) {
|
||||
if (!(parent instanceof WebApplicationContext)) {
|
||||
String resourceBasePath = webMergedConfig.getResourceBasePath();
|
||||
ResourceLoader resourceLoader = (resourceBasePath.startsWith(ResourceLoader.CLASSPATH_URL_PREFIX) ?
|
||||
new DefaultResourceLoader() : new FileSystemResourceLoader());
|
||||
|
||||
Reference in New Issue
Block a user