equal
deleted
inserted
replaced
281 static boolean atBugLevel(String bl) { // package-private |
281 static boolean atBugLevel(String bl) { // package-private |
282 String level = bugLevel; |
282 String level = bugLevel; |
283 if (level == null) { |
283 if (level == null) { |
284 if (!VM.isBooted()) |
284 if (!VM.isBooted()) |
285 return false; |
285 return false; |
286 bugLevel = level = AccessController.doPrivileged( |
286 bugLevel = level = |
287 new GetPropertyAction("sun.nio.cs.bugLevel", "")); |
287 GetPropertyAction.getProperty("sun.nio.cs.bugLevel", ""); |
288 } |
288 } |
289 return level.equals(bl); |
289 return level.equals(bl); |
290 } |
290 } |
291 |
291 |
292 /** |
292 /** |
607 * @since 1.5 |
607 * @since 1.5 |
608 */ |
608 */ |
609 public static Charset defaultCharset() { |
609 public static Charset defaultCharset() { |
610 if (defaultCharset == null) { |
610 if (defaultCharset == null) { |
611 synchronized (Charset.class) { |
611 synchronized (Charset.class) { |
612 String csn = AccessController.doPrivileged( |
612 String csn = GetPropertyAction.getProperty("file.encoding"); |
613 new GetPropertyAction("file.encoding")); |
|
614 Charset cs = lookup(csn); |
613 Charset cs = lookup(csn); |
615 if (cs != null) |
614 if (cs != null) |
616 defaultCharset = cs; |
615 defaultCharset = cs; |
617 else |
616 else |
618 defaultCharset = forName("UTF-8"); |
617 defaultCharset = forName("UTF-8"); |