This commit is contained in:
jendib 2013-08-26 22:03:14 +02:00
parent 6e3d2ea972
commit ac3580fb4a

View File

@ -54,9 +54,10 @@ public class ResourceUtil {
// Extract the JAR path
String jarPath = dirUrl.getPath().substring(5, dirUrl.getPath().indexOf("!"));
JarFile jar = new JarFile(URLDecoder.decode(jarPath, "UTF-8"));
Enumeration<JarEntry> entries = jar.entries();
Set<String> fileSet = new HashSet<String>();
try {
Enumeration<JarEntry> entries = jar.entries();
while (entries.hasMoreElements()) {
// Filter according to the path
String entryName = entries.nextElement().getName();
@ -76,6 +77,10 @@ public class ResourceUtil {
}
}
}
} finally {
jar.close();
}
return Lists.newArrayList(fileSet);
}