mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8204494: Fix for 8200530 triggered regression, closed/test/jdk/security/infra/java/security/KeyStore/BouncyCastleInterop.java failed
Reviewed-by: rriggs
This commit is contained in:
parent
c83db6b4d1
commit
bb4b387398
1 changed files with 21 additions and 1 deletions
|
@ -393,7 +393,27 @@ public class Manifest implements Cloneable {
|
||||||
off += n;
|
off += n;
|
||||||
total += n;
|
total += n;
|
||||||
pos = tpos;
|
pos = tpos;
|
||||||
if (c == '\n' || c == '\r') {
|
c = tbuf[tpos-1];
|
||||||
|
if (c == '\n') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (c == '\r') {
|
||||||
|
if (count == pos) {
|
||||||
|
// try to see if there is a trailing LF
|
||||||
|
fill();
|
||||||
|
if (pos < count && tbuf[pos] == '\n') {
|
||||||
|
if (total < len) {
|
||||||
|
b[off++] = '\n';
|
||||||
|
total++;
|
||||||
|
} else {
|
||||||
|
// we should always have big enough lbuf but
|
||||||
|
// just in case we don't, replace the last CR
|
||||||
|
// with LF.
|
||||||
|
b[off - 1] = '\n';
|
||||||
|
}
|
||||||
|
pos++;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue