diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java index 7a55c4205b2..69133ffd84f 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java @@ -74,13 +74,12 @@ public class JettyWebXmlConfiguration extends AbstractConfiguration jetty=web_inf.addPath("web-jetty.xml"); if(jetty.exists()) - { + { if(LOG.isDebugEnabled()) LOG.debug("Configure: "+jetty); Object xml_attr=context.getAttribute(XML_CONFIGURATION); context.removeAttribute(XML_CONFIGURATION); - final XmlConfiguration jetty_config = xml_attr instanceof XmlConfiguration ?(XmlConfiguration)xml_attr :new XmlConfiguration(jetty.getURI().toURL()); @@ -88,8 +87,7 @@ public class JettyWebXmlConfiguration extends AbstractConfiguration try { - final XmlConfiguration config=jetty_config; - WebAppClassLoader.runWithServerClassAccess(()->{config.configure(context);return null;}); + WebAppClassLoader.runWithServerClassAccess(()->{jetty_config.configure(context);return null;}); } catch(Exception e) { diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java index d15d10ad9b7..192c7662f6b 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java @@ -24,6 +24,7 @@ import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.security.PermissionCollection; +import java.security.PrivilegedExceptionAction; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -33,6 +34,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.Callable; import javax.servlet.ServletContext; import javax.servlet.ServletRegistration.Dynamic; @@ -212,7 +214,7 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL private boolean _configurationDiscovered=true; private boolean _allowDuplicateFragmentNames = false; private boolean _throwUnavailableOnStartupException = false; - + private MetaData _metadata=new MetaData(); @@ -803,7 +805,7 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL { _systemClasses.add(classOrPackage); } - + /* ------------------------------------------------------------ */ @Override public boolean isServerClass(String name)