mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8234147: Avoid looking up standard charsets in core libraries
Reviewed-by: alanb
This commit is contained in:
parent
4e64af81a2
commit
cd589d8469
36 changed files with 200 additions and 237 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue