From e1bade217fce90cd0acd1aabfc7bef7b188edf84 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Fri, 16 Oct 2015 15:16:43 +1100 Subject: [PATCH] 479839 Regression when starting application with excessive scan times --- .../eclipse/jetty/annotations/AnnotationConfiguration.java | 2 +- .../org/eclipse/jetty/annotations/AnnotationParser.java | 2 +- .../java/org/eclipse/jetty/webapp/MetaInfConfiguration.java | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java index 3a9342c7992..48d5b93f2ea 100644 --- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java +++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationConfiguration.java @@ -738,7 +738,7 @@ public class AnnotationConfiguration extends AbstractConfiguration loadingJarName = loadingJarName.substring(0,i+4); loadingJarName = (loadingJarName.startsWith("jar:")?loadingJarName.substring(4):loadingJarName); - return Resource.newResource(loadingJarName, false); + return Resource.newResource(loadingJarName); } /** diff --git a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java index 1f261e07371..05bebef9845 100644 --- a/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java +++ b/jetty-annotations/src/main/java/org/eclipse/jetty/annotations/AnnotationParser.java @@ -977,7 +977,7 @@ public class AnnotationParser || (!resolver.isExcluded(shortName) && (!isParsed(shortName) || resolver.shouldOverride(shortName)))) { - Resource clazz = Resource.newResource("jar:"+jar.getURI()+"!/"+name,false); + Resource clazz = Resource.newResource("jar:"+jar.getURI()+"!/"+name); if (LOG.isDebugEnabled()) {LOG.debug("Scanning class from jar {}", clazz);}; try (InputStream is = clazz.getInputStream()) { diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java index 497d7b78485..1f4994f25d3 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/MetaInfConfiguration.java @@ -181,7 +181,7 @@ public class MetaInfConfiguration extends AbstractConfiguration { //Resource represents a packed jar URI uri = target.getURI(); - resourcesDir = Resource.newResource("jar:"+uri+"!/META-INF/resources", false); + resourcesDir = Resource.newResource("jar:"+uri+"!/META-INF/resources"); } if (!resourcesDir.exists() || !resourcesDir.isDirectory()) @@ -252,7 +252,7 @@ public class MetaInfConfiguration extends AbstractConfiguration else { URI uri = jar.getURI(); - webFrag = Resource.newResource("jar:"+uri+"!/META-INF/web-fragment.xml", false); + webFrag = Resource.newResource("jar:"+uri+"!/META-INF/web-fragment.xml"); } if (!webFrag.exists() || webFrag.isDirectory()) { @@ -404,7 +404,7 @@ public class MetaInfConfiguration extends AbstractConfiguration URL url = new URL("jar:"+uri+"!/"); JarURLConnection jarConn = (JarURLConnection) url.openConnection(); - jarConn.setUseCaches(false); + jarConn.setUseCaches(Resource.getDefaultUseCaches()); JarFile jarFile = jarConn.getJarFile(); Enumeration entries = jarFile.entries(); while (entries.hasMoreElements())