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

@ -28,11 +28,11 @@ package java.util.zip;
import java.io.OutputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Vector;
import java.util.HashSet;
import static java.util.zip.ZipConstants64.*;
import static java.util.zip.ZipUtils.*;
import sun.nio.cs.UTF_8;
import sun.security.action.GetPropertyAction;
/**
@ -116,7 +116,7 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant
* @param out the actual output stream
*/
public ZipOutputStream(OutputStream out) {
this(out, StandardCharsets.UTF_8);
this(out, UTF_8.INSTANCE);
}
/**