Please review java.util.jar.pack.* exceptions

Kumar Srinivasan kumar.x.srinivasan at oracle.COM
Thu Nov 4 13:03:04 UTC 2010


On 11/4/2010 3:53 AM, Alan Bateman wrote:
> Kumar Srinivasan wrote:
>> Thanks for all the reviews and suggestions!
>>
>> the new version is at:
>> http://cr.openjdk.java.net/~ksrini/6985763/webrev.01
>>
>> In this revision:
>> 1. the input parameter is renamed to "in",
>>     btw. we call out throwing of  NPEs at the package level 
>> documentation
>>     
>> http://download.oracle.com/javase/6/docs/api/java/util/jar/Pack200.html
>>     I copied the same verbiage to the interfaces sections as well.
>>
>> 2. moved the exception check into scanJar,  per Alan's suggestion 
>> where it is
>>     isolated to catch IllegalStateException and wraps it up into an IOE.
>>
>>
>> Thanks
>> Kumar
> This looks much better. It may be slightly better to limit the 
> handling of the IllegalStateException to just the call to the 
> JarFile's entries method but I can't see anything else that might 
> throw it so what you have is fine with me.
>
> On the test, I notice you compile with -XDignore.symbol.file but I 
> don't think that is needed. Also, it might be better 
No  the -XD is needed the Utils.java is dependent on sun.* apis,
which will not be accessible when compiling and testing with a built
SDK, which is required for Pack200 testing.

> to eliminate the reference to a JCK test.

ok will yank it out, and will also use the getLocalizedMessage to get
the exception message per Mike's suggestion.

Do you guys need to see another webrev revision ?
Kumar


>
> -Alan.




More information about the core-libs-dev mailing list