-
Bug
-
Resolution: Fixed
-
P3
-
6
-
None
-
b61
-
generic
-
generic
Date: Wed, 24 Aug 2005 13:12:24 -0700
To: Elliotte Harold <###@###.###>
CC: ###@###.###
Elliotte Harold wrote:
>> In Pack200.Packer the JavaDocs state that for an unknown attribute, "
>> The string ERROR means that the pack operation as a whole will fail,
>> with a suitable explanation." That's fine as far as it goes but it
>> doesn't go far enough. It does not tell me how the operation fails. In
>> particular does the method complete normally or does it throw an
>> exception? If an exception which one? An IOException or a
>> RuntimeException both seem possible here.
You're right. This should be specified in the API, and it's a bug that
it's not. It ought to be an IOException, but in fact the implementation
happens to throw an implementation-specific flavor of RuntimeException.
>> I have not yet been able to construct a test case that shows what the
>> JDK actually does here. If you could answer that question, it would be
>> appreciated. I did file a bug asking that this be clarified as well.
Here's an example:
--------
$JAVA_HOME/bin/pack200 -CSourceFile=error /tmp/foo.pack.gz /tmp/foo.jar
Exception in thread "main"
com.sun.java.util.jar.pack.Attribute$FormatException: class.SourceFile:
attribute not allowed in javax/swing/SwingBeanInfoBase
at
com.sun.java.util.jar.pack.ClassReader.readAttributes(ClassReader.java:335)
at com.sun.java.util.jar.pack.ClassReader.read(ClassReader.java:127)
at
com.sun.java.util.jar.pack.PackerImpl$DoPack.readClass(PackerImpl.java:486)
at com.sun.java.util.jar.pack.PackerImpl$DoPack.run(PackerImpl.java:460)
at com.sun.java.util.jar.pack.PackerImpl.pack(PackerImpl.java:73)
at com.sun.java.util.jar.pack.Driver.main(Driver.java:261)
--------
To: Elliotte Harold <###@###.###>
CC: ###@###.###
Elliotte Harold wrote:
>> In Pack200.Packer the JavaDocs state that for an unknown attribute, "
>> The string ERROR means that the pack operation as a whole will fail,
>> with a suitable explanation." That's fine as far as it goes but it
>> doesn't go far enough. It does not tell me how the operation fails. In
>> particular does the method complete normally or does it throw an
>> exception? If an exception which one? An IOException or a
>> RuntimeException both seem possible here.
You're right. This should be specified in the API, and it's a bug that
it's not. It ought to be an IOException, but in fact the implementation
happens to throw an implementation-specific flavor of RuntimeException.
>> I have not yet been able to construct a test case that shows what the
>> JDK actually does here. If you could answer that question, it would be
>> appreciated. I did file a bug asking that this be clarified as well.
Here's an example:
--------
$JAVA_HOME/bin/pack200 -CSourceFile=error /tmp/foo.pack.gz /tmp/foo.jar
Exception in thread "main"
com.sun.java.util.jar.pack.Attribute$FormatException: class.SourceFile:
attribute not allowed in javax/swing/SwingBeanInfoBase
at
com.sun.java.util.jar.pack.ClassReader.readAttributes(ClassReader.java:335)
at com.sun.java.util.jar.pack.ClassReader.read(ClassReader.java:127)
at
com.sun.java.util.jar.pack.PackerImpl$DoPack.readClass(PackerImpl.java:486)
at com.sun.java.util.jar.pack.PackerImpl$DoPack.run(PackerImpl.java:460)
at com.sun.java.util.jar.pack.PackerImpl.pack(PackerImpl.java:73)
at com.sun.java.util.jar.pack.Driver.main(Driver.java:261)
--------
- relates to
-
JDK-6211177 One of Pack200 tests fail with -Dcom.sun.java.util.jar.pack.disable.native=true
-
- Resolved
-