8273329: Remove redundant null check from String.getBytes(String charsetName)

Reviewed-by: rriggs, iris, naoto
This commit is contained in:
Sergey Tsypanov 2021-09-08 15:54:36 +00:00 committed by Naoto Sato
parent cb112affd6
commit e5f298a7f1

View File

@ -1752,7 +1752,6 @@ public final class String
*/
public byte[] getBytes(String charsetName)
throws UnsupportedEncodingException {
if (charsetName == null) throw new NullPointerException();
return encode(lookupCharset(charsetName), coder(), value);
}