Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.util.zip.ZipException while analyzing a class file #6

Open
eungjun-yi opened this issue May 14, 2015 · 1 comment
Open

java.util.zip.ZipException while analyzing a class file #6

eungjun-yi opened this issue May 14, 2015 · 1 comment

Comments

@eungjun-yi
Copy link

When I try to analyze a class file with findbugs GUI tool and MutabilityDetector4FindBugs plugin, findbugs popups a dialog box which describes an exception occurred as follows:

  Exception analyzing Test using detector org.mutabilitydetector.findbugs.MutabilityDetector4FindBugs
    java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
      At org.mutabilitydetector.repackaged.com.google.classpath.ClassPathFactory.createFromPaths(ClassPathFactory.java:50)
      At org.mutabilitydetector.repackaged.com.google.classpath.ClassPathFactory.createFromPath(ClassPathFactory.java:39)
      At org.mutabilitydetector.findbugs.FBClasspathConverter.createClassPathForCodeBases(FBClasspathConverter.java:18)
      At org.mutabilitydetector.findbugs.MutabilityDetector4FindBugs$AnalysisSessionHolder.makeFindBugsClasspathAvailable(MutabilityDetector4FindBugs.java:78)
      At org.mutabilitydetector.findbugs.MutabilityDetector4FindBugs$AnalysisSessionHolder.createNewAnalysisSession(MutabilityDetector4FindBugs.java:69)
      At org.mutabilitydetector.findbugs.MutabilityDetector4FindBugs$AnalysisSessionHolder.lazyGet(MutabilityDetector4FindBugs.java:58)
      At org.mutabilitydetector.findbugs.IncorrectlyAppliedImmutableAnnotationDetector.doMutabilityAnalysis(IncorrectlyAppliedImmutableAnnotationDetector.java:72)
      At org.mutabilitydetector.findbugs.IncorrectlyAppliedImmutableAnnotationDetector.visitClassContext(IncorrectlyAppliedImmutableAnnotationDetector.java:66)
      At org.mutabilitydetector.findbugs.MutabilityDetector4FindBugs.visitClassContext(MutabilityDetector4FindBugs.java:47)
      At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:74)
      At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1209)
      At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:282)
      At edu.umd.cs.findbugs.gui2.BugLoader.doAnalysis(BugLoader.java:99)
      At edu.umd.cs.findbugs.gui2.AnalyzingDialog$AnalysisThread.run(AnalyzingDialog.java:260)

And also it produces log entries to console as follows:

5월 14, 2015 10:58:07 오전 org.mutabilitydetector.repackaged.com.google.classpath.JARClassPath loadEntries
경고: Failed to read Jar file /home/nori/mysrc/test/java/mutability/Test.class

Finally the result of the analyze does not include diagonastic reports about mutability.

It works well when analyzing a jar file.

@Grundlefleck
Copy link
Contributor

Hi, thanks for the report. Will try to have a look over this weekend. I don't tend to use FindBugs on zip files, so haven't come across this issue before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants