8200530: '\r' is not supported as "newline" in java.util.jar.Manifest

Reviewed-by: jlaskey
This commit is contained in:
Xueming Shen 2018-06-05 10:03:46 -07:00
parent 8b4b130011
commit fcfd1c85dd
3 changed files with 134 additions and 4 deletions

View file

@ -377,7 +377,8 @@ public class Attributes implements Map<Object,Object>, Cloneable {
int len;
while ((len = is.readLine(lbuf)) != -1) {
boolean lineContinued = false;
if (lbuf[--len] != '\n') {
byte c = lbuf[--len];
if (c != '\n' && c != '\r') {
throw new IOException("line too long");
}
if (len > 0 && lbuf[len-1] == '\r') {