RFR : 7148584 Jar tools fails to generate manifest correctly when boundary condition hit
Seán Coffey
sean.coffey at oracle.com
Mon Mar 12 09:28:07 UTC 2012
Alan,
I did (briefly) look into using the java.util.jar API but wasn't seeing
the bug being triggered. Decided to use the jar process command as an
alternative.
The testcase was a port from JDK 6 and didn't contain JDK 7+ features.
I've converted it now though. Hope it's cleaner.
http://cr.openjdk.java.net/~coffeys/webrev.7148584.jdk8.2/
regards,
Sean.
On 09/03/2012 16:18, Alan Bateman wrote:
> On 09/03/2012 15:52, Seán Coffey wrote:
>> Issue seen when the inner Manifest.FastInputStream.peek() method is
>> called just as we hit EOF of main buffer being parsed (the manifest
>> input file)
>>
>> Simple fix involves getting peek() to return -1 if a fill() request
>> fails to read anything.
>>
>> webrev : http://cr.openjdk.java.net/~coffeys/webrev.7148584.jdk8/
>> Bug report : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7148584
>>
>> regards,
>> Sean.
>>
> The change looks okay to me.
>
> On the test case then I assume it could have been done with the
> java.util.jar APIs rather than calling into the jar command. Also it
> might be cleaner to use try-with-resources.
>
> -Alan.
More information about the core-libs-dev
mailing list