PR #9878 - fixes for test failures
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
a67e48d1ee
commit
4c1cf7de64
|
@ -610,16 +610,13 @@ public class ContextHandler extends ScopedHandler implements Attributes, Supplie
|
|||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_coreContextHandler.removeEventListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lifeCycleStarted(LifeCycle event)
|
||||
{
|
||||
_coreContextHandler.manage(this);
|
||||
_coreContextHandler.removeEventListener(this);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -669,16 +666,13 @@ public class ContextHandler extends ScopedHandler implements Attributes, Supplie
|
|||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_coreContextHandler.removeEventListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lifeCycleStopped(LifeCycle event)
|
||||
{
|
||||
_coreContextHandler.manage(this);
|
||||
_coreContextHandler.removeEventListener(this);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -879,7 +873,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Supplie
|
|||
else
|
||||
context.call(() -> nextScope(target, baseRequest, request, response), baseRequest.getCoreRequest());
|
||||
}
|
||||
catch (IOException | ServletException e)
|
||||
catch (IOException | ServletException | RuntimeException e)
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
|
|
|
@ -503,6 +503,7 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
|||
@Override
|
||||
protected void doStart() throws Exception
|
||||
{
|
||||
ClassLoader old = Thread.currentThread().getContextClassLoader();
|
||||
try
|
||||
{
|
||||
_metadata.setAllowDuplicateFragmentNames(isAllowDuplicateFragmentNames());
|
||||
|
@ -526,6 +527,10 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
|||
if (isThrowUnavailableOnStartupException())
|
||||
throw t;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Thread.currentThread().setContextClassLoader(old);
|
||||
}
|
||||
}
|
||||
|
||||
private void wrapConfigurations()
|
||||
|
|
Loading…
Reference in New Issue