479839 Regression when starting application with excessive scan times

This commit is contained in:
Jan Bartel 2015-10-16 15:16:43 +11:00
parent cfeee5cec7
commit e1bade217f
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}
/**

View File

@ -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())
{

View File

@ -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<JarEntry> entries = jarFile.entries();
while (entries.hasMoreElements())