Community
Participate
Working Groups
Surfaced in the PDE Build tests with changes in Bug 387557. Marked as major as it could break signing in a build. I'll provide a patch once I check that I've caught all the cases. This could be avoided in the future by turning on JDT's potential resource leak checker. However, the use of Utils.close() means that the builder returns a lot of false positive.
Something else that might be worth looking into. In some of the tests, when closing one zip entry and moving to the next, there is an off-by-one error in the byte size. This threw an exception and left a stream open. While my patch will fix the resource leak, I am not sure whether the incorrect size is a problem or not. [null] Signing JAR: C:\Users\windattc\Documents\WS\junit-workspace\pde.build\265726\buildRepo\plugins\org.eclipse.e4.core.di.extensions_0.11.0.v20120523-2004.jar to C:\Users\windattc\Documents\WS\junit-workspace\pde.build\265726\buildRepo\plugins\org.eclipse.e4.core.di.extensions_0.11.0.v20120523-2004.jar as pde.build [null] Enter Passphrase for keystore: Enter key password for pde.build: [p2.process.artifacts] java.util.zip.ZipException: invalid entry compressed size (expected 574 but got 575 bytes) [p2.process.artifacts] at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:259) [p2.process.artifacts] at org.eclipse.equinox.internal.p2.jarprocessor.unsigner.Unsigner.processJar(Unsigner.java:103) [p2.process.artifacts] at org.eclipse.equinox.internal.p2.jarprocessor.unsigner.Unsigner.execute(Unsigner.java:67) [p2.process.artifacts] at org.eclipse.equinox.internal.p2.jarprocessor.unsigner.UnsignCommand.execute(UnsignCommand.java:35) [p2.process.artifacts] at org.eclipse.equinox.internal.p2.jarprocessor.unsigner.UnsignCommand.postProcess(UnsignCommand.java:26) [p2.process.artifacts] at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor.postProcess(JarProcessor.java:252)
Created attachment 222849 [details] Fix for unclosed streams
This week is M3. I imagine this needs to be pushed to M4?
Thanks Curtis, I have reviewed your fix and committed with a few minor tweaks: http://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/?id=1971740ba62534120d9f33162963d4517c898424