Polishing

This commit is contained in:
Juergen Hoeller
2018-01-22 21:34:44 +01:00
parent b47491695e
commit 61579ffe7b
12 changed files with 43 additions and 54 deletions

View File

@@ -190,7 +190,6 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
}
else {
ServletContext servletContext = null;
// Find the root WebApplicationContext
while (parent != null) {
if (parent instanceof WebApplicationContext && !(parent.getParent() instanceof WebApplicationContext)) {
@@ -199,7 +198,7 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
}
parent = parent.getParent();
}
Assert.state(servletContext != null, "Failed to find Root WebApplicationContext in the context hierarchy");
Assert.state(servletContext != null, "Failed to find root WebApplicationContext in the context hierarchy");
context.setServletContext(servletContext);
}
}