8289908: Skip bounds check for cases when String is constructed from entirely used byte[]

Reviewed-by: prr, rriggs, aturbanov
This commit is contained in:
Sergey Tsypanov 2022-07-18 17:15:46 +00:00 committed by Phil Race
parent b2010a7481
commit efed7a7f65
5 changed files with 96 additions and 13 deletions

View file

@ -336,7 +336,7 @@ public class Manifest implements Cloneable {
lastline = buf;
continue;
}
name = new String(buf, 0, buf.length, UTF_8.INSTANCE);
name = new String(buf, UTF_8.INSTANCE);
lastline = null;
}
Attributes attr = getAttributes(name);