--- old/src/jdk.charsets/share/classes/sun/nio/cs/ext/JISAutoDetect.java 2020-05-20 18:02:58.681504598 -0700 +++ new/src/jdk.charsets/share/classes/sun/nio/cs/ext/JISAutoDetect.java 2020-05-20 18:02:58.345498147 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,7 +97,7 @@ (PrivilegedAction) () -> System.getProperty("os.name")); private final static String SJISName = getSJISName(); - private final static String EUCJPName = getEUCJPName(); + private final static String EUCJPName = "EUC_JP"; private DelegatableDecoder detectedDecoder = null; public Decoder(Charset cs) { @@ -225,24 +225,11 @@ * Returned Shift_JIS Charset name is OS dependent */ private static String getSJISName() { - if (osName.equals("Solaris") || osName.equals("SunOS")) - return("PCK"); - else if (osName.startsWith("Windows")) + if (osName.startsWith("Windows")) return("windows-31J"); else return("Shift_JIS"); } - /** - * Returned EUC-JP Charset name is OS dependent - */ - - private static String getEUCJPName() { - if (osName.equals("Solaris") || osName.equals("SunOS")) - return("x-eucjp-open"); - else - return("EUC_JP"); - } - } }