Summary: | java.lang.IllegalStateException: zip file closed on typing while "Computing additional info" | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Probst <mail> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | daniel_megert, eclipse, martinae, philippe_mulet | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.2 RC4 | ||||||
Hardware: | Macintosh | ||||||
OS: | Mac OS X - Carbon (unsup.) | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Martin Probst
2006-05-09 04:19:29 EDT
Should be investigated for RC4. In the worse case, we should throw a JME not an IllegalStateException. The failure occurs when trying to close the jarFile from the JarURLConnection. On Windows or Linux, the file is not closed when the stream is closed. I could add a catch for runtime exception or IllegalStateException around this call to silently eat this exception since we simply want to be sure that the file handle is released. Created attachment 40781 [details]
Proposed fix
+1 to add this workaround for RC4 - the patch is of very low riks. +1 for 3.2RC4. Martin - pls cast your vote Well, I'm certainly for fixing the problem, but I don't have a working Eclipse build system around (I tried, but it apparently didn't like me...) so I cannot test the patch. Fix sounds good though :-) + 1 for 3.2 RC4. patch looks good. Fixed and released in HEAD. No regression test available since this is MacOS specific. To verify, simply check that the IllegalStateException are handled in the source code. Verified with I20060511-2000 for 3.2RC4 (In reply to comment #10) > Verified with I20060511-2000 for 3.2RC4 This bug appears in 3.2RC7. It is appearing when attempting to get the JavaDoc via the JavaDoc view or hover in the Java Editor. The related JAR file has the JavaDoc in the JAR and is configured using the JavaDoc Location specified against the JAR with a local file system path and the archive specific (doc) folder. The location passes validation. The JavaDoc for the related JAR appears the first time it is accessed, and the exception it throw thereafter. java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:398) at java.util.zip.ZipFile.getEntry(ZipFile.java:145) at java.util.jar.JarFile.getEntry(JarFile.java:194) at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:89) at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:95) at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:107) at org.eclipse.jdt.internal.core.JavaElement.getURLContents(JavaElement.java:734) at org.eclipse.jdt.internal.core.BinaryType.getJavadocContents(BinaryType.java:1086) at org.eclipse.jdt.internal.core.BinaryType.getAttachedJavadoc(BinaryType.java:998) at org.eclipse.jdt.ui.JavadocContentAccess.getHTMLContentReader(JavadocContentAccess.java:120) at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:153) at org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.getHoverInfo(AbstractJavaEditorTextHover.java:121) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo(BestMatchHover.java:102) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo(JavaEditorTextHoverProxy.java:69) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:160) This is a different issue. I opened bug 147771. Could you please add yourself on the cc list and confirm that you are on MacOS? Thanks. |