Issue #5950 - remove WebAppClassLoader logging during loadClass

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2021-02-08 13:02:48 -06:00
parent f768e2ed68
commit 165aa1a60a
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
3 changed files with 2 additions and 27 deletions

View File

@ -43,8 +43,6 @@ import org.eclipse.jetty.util.IncludeExcludeSet;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.TypeUtil;
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.resource.Resource;
/**
@ -69,8 +67,6 @@ import org.eclipse.jetty.util.resource.Resource;
public class ClasspathPattern extends AbstractSet<String>
{
private static final Logger LOG = Log.getLogger(ClasspathPattern.class);
static class Entry
{
private final String _pattern;
@ -697,9 +693,8 @@ public class ClasspathPattern extends AbstractSet<String>
{
return combine(_packageOrNamePatterns, clazz.getName(), _locations, () -> TypeUtil.getLocationOfClass(clazz));
}
catch (Exception e)
catch (Exception ignored)
{
LOG.warn(e);
}
return false;
}
@ -719,9 +714,8 @@ public class ClasspathPattern extends AbstractSet<String>
{
return URIUtil.getJarSource(url.toURI());
}
catch (URISyntaxException e)
catch (URISyntaxException ignored)
{
LOG.ignore(e);
return null;
}
});

View File

@ -475,8 +475,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;
}
@ -493,8 +491,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;
}
}
@ -515,8 +511,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)
@ -545,8 +539,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;
}
}
@ -655,9 +647,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);

View File

@ -790,8 +790,6 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
loadServerClasses();
boolean result = _serverClasses.match(clazz);
if (LOG.isDebugEnabled())
LOG.debug("isServerClass=={} {}", result, clazz);
return result;
}
@ -802,8 +800,6 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
loadSystemClasses();
boolean result = _systemClasses.match(clazz);
if (LOG.isDebugEnabled())
LOG.debug("isSystemClass=={} {}", result, clazz);
return result;
}
@ -814,8 +810,6 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
loadServerClasses();
boolean result = _serverClasses.match(name, parentUrl);
if (LOG.isDebugEnabled())
LOG.debug("isServerResource=={} {} {}", result, name, parentUrl);
return result;
}
@ -826,8 +820,6 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
loadSystemClasses();
boolean result = _systemClasses.match(name, webappUrl);
if (LOG.isDebugEnabled())
LOG.debug("isSystemResource=={} {} {}", result, name, webappUrl);
return result;
}