Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
This commit is contained in:
commit
a8597e07fe
|
@ -1,6 +1,7 @@
|
|||
//
|
||||
// ========================================================================
|
||||
// Copyright (c) 1995-2021 Mort Bay Consulting Pty Ltd and others.
|
||||
// Copyright (c) 1995-2021 Mort Bay Consulting Pty Ltd and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
|
@ -65,8 +66,6 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
public class ClassMatcher extends AbstractSet<String>
|
||||
{
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ClassMatcher.class);
|
||||
|
||||
public static class Entry
|
||||
{
|
||||
private final String _pattern;
|
||||
|
@ -722,9 +721,8 @@ public class ClassMatcher extends AbstractSet<String>
|
|||
{
|
||||
return combine(_patterns, clazz.getName(), _locations, () -> TypeUtil.getLocationOfClass(clazz));
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception ignored)
|
||||
{
|
||||
LOG.warn("Unable to match against {}", clazz, e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -744,14 +742,13 @@ public class ClassMatcher extends AbstractSet<String>
|
|||
{
|
||||
return URIUtil.getJarSource(url.toURI());
|
||||
}
|
||||
catch (URISyntaxException e)
|
||||
catch (URISyntaxException ignored)
|
||||
{
|
||||
LOG.trace("IGNORED", e);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Match a class against inclusions and exclusions by name and location.
|
||||
* Name based checks are performed before location checks. For a class to match,
|
||||
|
|
|
@ -448,8 +448,6 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
|
|||
webappClass = findLoadedClass(name);
|
||||
if (webappClass != null)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("found webapp loaded {}", webappClass);
|
||||
return webappClass;
|
||||
}
|
||||
|
||||
|
@ -466,8 +464,6 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
|
|||
// If the webapp is allowed to see this class
|
||||
if (Boolean.TRUE.equals(__loadServerClasses.get()) || !_context.isServerClass(parentClass))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("PLP parent loaded {}", parentClass);
|
||||
return parentClass;
|
||||
}
|
||||
}
|
||||
|
@ -488,8 +484,6 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
|
|||
webappClass = this.findClass(name);
|
||||
if (resolve)
|
||||
resolveClass(webappClass);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("PLP webapp loaded {}", webappClass);
|
||||
return webappClass;
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
|
@ -518,8 +512,6 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
|
|||
// If the webapp is allowed to see this class
|
||||
if (Boolean.TRUE.equals(__loadServerClasses.get()) || !_context.isServerClass(parentClass))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("WAP parent loaded {}", parentClass);
|
||||
return parentClass;
|
||||
}
|
||||
}
|
||||
|
@ -607,9 +599,6 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
|
|||
content = url.openStream();
|
||||
byte[] bytes = IO.readBytes(content);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("foundClass({}) url={} cl={}", name, url, this);
|
||||
|
||||
for (ClassFileTransformer transformer : _transformers)
|
||||
{
|
||||
byte[] tmp = transformer.transform(this, name, null, null, bytes);
|
||||
|
|
|
@ -751,37 +751,25 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
|||
@Override
|
||||
public boolean isServerClass(Class<?> clazz)
|
||||
{
|
||||
boolean result = _serverClasses.match(clazz);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("isServerClass=={} {}", result, clazz);
|
||||
return result;
|
||||
return _serverClasses.match(clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSystemClass(Class<?> clazz)
|
||||
{
|
||||
boolean result = _systemClasses.match(clazz);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("isSystemClass=={} {}", result, clazz);
|
||||
return result;
|
||||
return _systemClasses.match(clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isServerResource(String name, URL url)
|
||||
{
|
||||
boolean result = _serverClasses.match(name, url);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("isServerResource=={} {} {}", result, name, url);
|
||||
return result;
|
||||
return _serverClasses.match(name, url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSystemResource(String name, URL url)
|
||||
{
|
||||
boolean result = _systemClasses.match(name, url);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("isSystemResource=={} {} {}", result, name, url);
|
||||
return result;
|
||||
return _systemClasses.match(name, url);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue