bndtools / bndtools

ARCHIVED: The contents of this repo have been merged into the `bnd` repo.
https://github.com/bndtools/bnd
Eclipse Public License 1.0
192 stars 90 forks source link

I/O error reading JAR file contents in Jar Editor #1636

Open rherrmann opened 7 years ago

rherrmann commented 7 years ago

My Bndtools workspace got stuck in an endless Building workspace loop (will try to isolate this and report separately). Before that happened, I opened a Jar editor on a jar file generated by bnd. Now, upon every workspace build cycle, the Jar editor shows an error dialog and writes the below stack trace to the error log.

java.io.FileNotFoundException: C:\Users\Ruediger\git\bndtools\bndtools.m2e\generated\bndtools.m2e.jar (The system cannot find the file specified)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at java.util.zip.ZipFile.<init>(Unknown Source)
    at bndtools.jareditor.internal.JAREntryPart$4.run(JAREntryPart.java:189)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
bjhargrave commented 7 years ago

Seems like the JAR editor is working as expected on an invalid jar.

Why the jar is invalid is a separate issue.

rherrmann commented 7 years ago

I disagree that an editor which shows unsolicited (error) message and gets in the users way is working as expected.

Take the text editor, for example, that doesn't refresh its contents just because the underlying file was changed outside the workspace. And if the Jar editor is really meant to refresh its content without the users desire, it should do so in a nonobstructive way, e.g. by using its content area to signal that underlying file is gone.

bjhargrave commented 7 years ago

If you open the JAR editor on an invalid jar file, what would you expect the editor to do besides display some message.

Perhaps your description of the issue was not sufficient to understand your meaning.

rherrmann commented 7 years ago

At the time I opened the JAR editor, the file did exist and was valid and the editor showed its contents just fine. After that, I did something that triggered the endless build loop and the editor showed the above-described behavior.

Does that clarify the circumstances?