-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.4.1
-
None
-
generic
-
generic
While investigating 4815502, I determined that when an invalid manifest is provide to "jar cm", the MANIFEST.MF file in the resulting jar file is invalid, though differently.
Testcase follows: Given the following bad.manifest file (bad because the newline expected between the 2 individual sections is missing), the META-INF/MANIFEST.MF below is produced.
---<bad.manifest>---
Manifest-Version: 1.0
Created-By: 1.2 (Sun Microsystems Inc.)
Implementation-Version: 1.0
Name: foo
Implementation-Version: 1.1
Name: bar
Implementation-Version: 1.2
---</bad.manifest>---
% jar cmf bad.manifest test.jar
You'll see a warning, as a result of the fix for 4815502.
% jar xf test.jar
% cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.2 (Sun Microsystems Inc.)
Implementation-Version: 1.0
Name: foo
Implementation-Version: 1.2
Name: bar
Notice that the Implementation-Version of foo is wrong, and that Implementation-Version for bar is missing.
Testcase follows: Given the following bad.manifest file (bad because the newline expected between the 2 individual sections is missing), the META-INF/MANIFEST.MF below is produced.
---<bad.manifest>---
Manifest-Version: 1.0
Created-By: 1.2 (Sun Microsystems Inc.)
Implementation-Version: 1.0
Name: foo
Implementation-Version: 1.1
Name: bar
Implementation-Version: 1.2
---</bad.manifest>---
% jar cmf bad.manifest test.jar
You'll see a warning, as a result of the fix for 4815502.
% jar xf test.jar
% cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.2 (Sun Microsystems Inc.)
Implementation-Version: 1.0
Name: foo
Implementation-Version: 1.2
Name: bar
Notice that the Implementation-Version of foo is wrong, and that Implementation-Version for bar is missing.
- relates to
-
JDK-4815502 jar command generates new warning Duplicate name in Manifest: Name
-
- Resolved
-