< prev index next >
src/java.base/share/classes/java/util/Base64.java
Print this page
rev 49550 : 8201179: Regression due loading java.nio.charset.StandardCharsets during bootstrap
Reviewed-by: sherman
@@ -28,11 +28,12 @@
import java.io.FilterOutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
+
+import sun.nio.cs.ISO_8859_1;
/**
* This class consists exclusively of static methods for obtaining
* encoders and decoders for the Base64 encoding scheme. The
* implementation of this class supports the following types of Base64
@@ -546,11 +547,11 @@
*
* @throws IllegalArgumentException
* 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));
}
/**
* Decodes all bytes from the input byte array using the {@link Base64}
* encoding scheme, writing the results into the given output byte array,
< prev index next >