Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-19 Thread Chris Hegarty
To close the loop on this, here is a link to the changeset: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/efc2791d7c5d Thanks for this valuable contribution Diego. -Chris On 16/06/12 05:20, Diego Belfer wrote: Hi Chris, Here is a new patch containing new version of the tests. The new

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-19 Thread Diego Belfer
Thanks for sponsoring the patch.. Best, Diego On Tue, Jun 19, 2012 at 7:15 AM, Chris Hegarty chris.hega...@oracle.comwrote: To close the loop on this, here is a link to the changeset:

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-15 Thread Diego Belfer
. Thanks, Diego Belfer [muralx] # HG changeset patch # User muralx # Date 1339820030 10800 # Node ID 7b531b09855a099fe0e9ea06ed7f2cb62ed0 # Parent fc575c78f5d314fd8ccbdc86c8b2d7631d736960 [PATCH] 6901992 - Possible InvalidJarIndexException due to bug

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-14 Thread Chris Hegarty
Diego, It's not too difficult to create jars on the fly using the Jar API. Here is a small example that I think would work nice in this case. Files created ( and paths are relative to the jtreg scratch, or working dir if running outside of jtreg ). Do you think you could use similar to

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-13 Thread Chris Hegarty
Hi Diego, Thanks for picking up this bug. I think your changes look fine. Mainly cleanup except for add - addExplicit/addMapping in merge, right? BTW the cleanup makes this more readable. Unfortunately, the tests you created require checking in a binary jar file. This is a real no no for

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-13 Thread Diego Belfer
Hi Chris, That's right. The only non-cleanup change is the one in the merge. Regarding the test case, I will re-write them in order to generate the jars on fly. I'd scanned the jdk/test folder and found a few jars, that's why I included them. I have seen your test case, I will use it as a

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-13 Thread chris hegarty
Diego, I'm thinking that some of the trivial source files, to compile and built into the jars, could be simply created and written by the test itself, rather than checking them all in. If this makes it cleaner. I really don't like all the file in test/sun/misc/JarIndex/metaInfFilenames, but

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-13 Thread Diego Belfer
Chris, I was thinking of something similar. I will create the jars and their contents using Java code. There is no need of creating real class files, using a few resource files and some directories will be enough. Best, Diego On Wed, Jun 13, 2012 at 6:46 PM, chris hegarty

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-13 Thread Diego Belfer
Hi Chris, There is no way to generate a jar without directory entries using the jar tool; there is no option for that. What do you think is the best way to handle this ? I don't want to re-implement the logic for creating a jar using the JarOutputStream class. Do you think it is possible to add

Re: PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-12 Thread Diego Belfer
# Parent fc575c78f5d314fd8ccbdc86c8b2d7631d736960 [PATCH] 6901992 - Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge() diff --git a/src/share/classes/sun/misc/JarIndex.java b/src/share/classes/sun/misc/JarIndex.java --- a/src/share/classes/sun/misc/JarIndex.java +++ b/src/share

PATCH [6901992] : Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()

2012-06-11 Thread Diego Belfer
5468e0a8af8a9638c930a14a0134d378754b3c97 # Parent fc575c78f5d314fd8ccbdc86c8b2d7631d736960 [PATCH] 6901992 - Possible InvalidJarIndexException due to bug in sun.misc.JarIndex.merge() diff --git a/src/share/classes/sun/misc/JarIndex.java b/src/share/classes/sun/misc/JarIndex.java --- a/src/share/classes/sun/misc/JarIndex.java +++ b/src