dnrajugade / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Classpath scanning fails every time on OSX #1215

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Classpath should probably ignore non valid jar files.

For example, when used on OSX. Classpath scanning attempts to open this file
/System/Library/Java/Extensions/libAppleScriptEngine.jnilib

However it is not a zip file so it fails with

Exception in thread "main" java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:214)
    at java.util.zip.ZipFile.<init>(ZipFile.java:144)
    at java.util.jar.JarFile.<init>(JarFile.java:152)
    at java.util.jar.JarFile.<init>(JarFile.java:116)
    at com.google.common.reflect.ClassPath.readClassesFromJar(ClassPath.java:248)
    at com.google.common.reflect.ClassPath.readClassesFrom(ClassPath.java:222)
    at com.google.common.reflect.ClassPath.readClassesFrom(ClassPath.java:208)
    at com.google.common.reflect.ClassPath.from(ClassPath.java:82)

Original issue reported on code.google.com by kaspe...@gmail.com on 29 Nov 2012 at 9:38

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 18 Dec 2012 at 3:34

GoogleCodeExporter commented 9 years ago

Original comment by kak@google.com on 5 Jan 2013 at 2:09

GoogleCodeExporter commented 9 years ago
[+kak for cherry-picking]

http://code.google.com/p/guava-libraries/source/detail?r=73836461de66c6b4c973947
871d5192610852d01

http://code.google.com/p/guava-libraries/source/detail?r=6a27957798dc10be458dcd6
17579a5f61a82b846

Original comment by cpov...@google.com on 7 Jan 2013 at 10:59

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08