-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b17
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204802 | 11.0.1 | Xueming Shen | P3 | Resolved | Fixed | team |
Jar Manifest Specifiction:
newline : CR LF | LF | CR (not followed by LF)
Test case:
-------------------------------------------------------------
byte[] mbytes =
("Manifest-Version: 1.0\r\n" +
"Created-By: 1.9.0-internal (Oracle Corporation)\r\n" +
"key1: value1\n" +
"key2: value2\r" +
"key3: value3\r\n" +
"key4: value4\n E\r\n" +
"key5: value5\r\n E\r\n" +
"key6: value6\r E\r\n" +
"key7: value7\r \r\n" +
"key8: value8 \r \r\n"
).getBytes();
Manifest m = new Manifest(new ByteArrayInputStream(mbytes));
Attributes attr = m.getMainAttributes();
System.out.println(" attr: ");
attr.forEach((k, v) -> System.out.println("[" + k + "] : [" + v + "]"));
System.out.println(" ----------------------");
----------------------------------------------------------------
newline : CR LF | LF | CR (not followed by LF)
Test case:
-------------------------------------------------------------
byte[] mbytes =
("Manifest-Version: 1.0\r\n" +
"Created-By: 1.9.0-internal (Oracle Corporation)\r\n" +
"key1: value1\n" +
"key2: value2\r" +
"key3: value3\r\n" +
"key4: value4\n E\r\n" +
"key5: value5\r\n E\r\n" +
"key6: value6\r E\r\n" +
"key7: value7\r \r\n" +
"key8: value8 \r \r\n"
).getBytes();
Manifest m = new Manifest(new ByteArrayInputStream(mbytes));
Attributes attr = m.getMainAttributes();
System.out.println(" attr: ");
attr.forEach((k, v) -> System.out.println("[" + k + "] : [" + v + "]"));
System.out.println(" ----------------------");
----------------------------------------------------------------
- backported by
-
JDK-8204802 '\r' is not supported as "newline" in java.util.jar.Manifest.
-
- Resolved
-
- duplicates
-
JDK-8176843 Manifest not strictly implementing its specification
-
- Closed
-
- relates to
-
JDK-8333398 Uncomment the commented test in test/jdk/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java
-
- Resolved
-
-
JDK-8204494 Fix for JDK-8200530 triggered regression: fails to handle the case that \r\n is at the 8192 boundary
-
- Resolved
-