8234147: Avoid looking up standard charsets in core libraries

Reviewed-by: alanb
This commit is contained in:
Ivan Gerasimov 2019-12-01 15:29:37 -08:00
parent 4e64af81a2
commit cd589d8469
36 changed files with 200 additions and 237 deletions

View file

@ -31,6 +31,9 @@ import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import sun.nio.cs.ISO_8859_1;
import jdk.internal.HotSpotIntrinsicCandidate;
/**
@ -584,7 +587,7 @@ public class Base64 {
* if {@code src} is not in valid Base64 scheme
*/
public byte[] decode(String src) {
return decode(src.getBytes(StandardCharsets.ISO_8859_1));
return decode(src.getBytes(ISO_8859_1.INSTANCE));
}
/**