equal
deleted
inserted
replaced
274 implements Comparable<Charset> |
274 implements Comparable<Charset> |
275 { |
275 { |
276 |
276 |
277 /* -- Static methods -- */ |
277 /* -- Static methods -- */ |
278 |
278 |
279 private static volatile String bugLevel = null; |
279 private static volatile String bugLevel; |
280 |
280 |
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 (!sun.misc.VM.isBooted()) |
284 if (!sun.misc.VM.isBooted()) |
322 private static CharsetProvider standardProvider = new StandardCharsets(); |
322 private static CharsetProvider standardProvider = new StandardCharsets(); |
323 |
323 |
324 // Cache of the most-recently-returned charsets, |
324 // Cache of the most-recently-returned charsets, |
325 // along with the names that were used to find them |
325 // along with the names that were used to find them |
326 // |
326 // |
327 private static volatile Object[] cache1 = null; // "Level 1" cache |
327 private static volatile Object[] cache1; // "Level 1" cache |
328 private static volatile Object[] cache2 = null; // "Level 2" cache |
328 private static volatile Object[] cache2; // "Level 2" cache |
329 |
329 |
330 private static void cache(String charsetName, Charset cs) { |
330 private static void cache(String charsetName, Charset cs) { |
331 cache2 = cache1; |
331 cache2 = cache1; |
332 cache1 = new Object[] { charsetName, cs }; |
332 cache1 = new Object[] { charsetName, cs }; |
333 } |
333 } |