8230744: Several classes throw OutOfMemoryError without message

Reviewed-by: psandoz, martin, bchristi, rriggs, smarks
This commit is contained in:
Jim Laskey 2020-06-11 10:08:23 -03:00
parent 2085fd32ff
commit 03642a01af
9 changed files with 27 additions and 53 deletions

View file

@ -1681,7 +1681,7 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
try {
newTempLen = Math.addExact(j + 2, Math.multiplyExact(3, pLen - i));
} catch (ArithmeticException ae) {
throw new OutOfMemoryError();
throw new OutOfMemoryError("Required pattern length too large");
}
int[] newtemp = new int[newTempLen];
System.arraycopy(temp, 0, newtemp, 0, j);