equal
deleted
inserted
replaced
28 import java.lang.ref.SoftReference; |
28 import java.lang.ref.SoftReference; |
29 import java.nio.charset.Charset; |
29 import java.nio.charset.Charset; |
30 import java.nio.charset.spi.CharsetProvider; |
30 import java.nio.charset.spi.CharsetProvider; |
31 import sun.nio.cs.AbstractCharsetProvider; |
31 import sun.nio.cs.AbstractCharsetProvider; |
32 import java.security.AccessController; |
32 import java.security.AccessController; |
33 import sun.security.action.GetPropertyAction; |
33 import java.security.PrivilegedAction; |
34 |
|
35 |
34 |
36 /** |
35 /** |
37 * Provider for extended charsets. |
36 * Provider for extended charsets. |
38 */ |
37 */ |
39 |
38 |
1173 return; |
1172 return; |
1174 if (!sun.misc.VM.isBooted()) |
1173 if (!sun.misc.VM.isBooted()) |
1175 return; |
1174 return; |
1176 |
1175 |
1177 String map = AccessController.doPrivileged( |
1176 String map = AccessController.doPrivileged( |
1178 new GetPropertyAction("sun.nio.cs.map")); |
1177 (PrivilegedAction<String>) () -> System.getProperty("sun.nio.cs.map")); |
1179 boolean sjisIsMS932 = false; |
1178 boolean sjisIsMS932 = false; |
1180 boolean iso2022jpIsMS50221 = false; |
1179 boolean iso2022jpIsMS50221 = false; |
1181 boolean iso2022jpIsMS50220 = false; |
1180 boolean iso2022jpIsMS50220 = false; |
1182 boolean iso2022jpIsMSISO2022JP = false; |
1181 boolean iso2022jpIsMSISO2022JP = false; |
1183 if (map != null) { |
1182 if (map != null) { |
1294 |
1293 |
1295 |
1294 |
1296 } |
1295 } |
1297 } |
1296 } |
1298 String osName = AccessController.doPrivileged( |
1297 String osName = AccessController.doPrivileged( |
1299 new GetPropertyAction("os.name")); |
1298 (PrivilegedAction<String>) () -> System.getProperty("os.name")); |
1300 if ("SunOS".equals(osName) || "Linux".equals(osName) || "AIX".equals(osName) |
1299 if ("SunOS".equals(osName) || "Linux".equals(osName) || "AIX".equals(osName) |
1301 || osName.contains("OS X")) { |
1300 || osName.contains("OS X")) { |
1302 charset("x-COMPOUND_TEXT", "COMPOUND_TEXT", |
1301 charset("x-COMPOUND_TEXT", "COMPOUND_TEXT", |
1303 new String[] { |
1302 new String[] { |
1304 "COMPOUND_TEXT", // JDK historical |
1303 "COMPOUND_TEXT", // JDK historical |