equal
deleted
inserted
replaced
62 * jdk.nio.maxCachedBufferSize property. Even though |
62 * jdk.nio.maxCachedBufferSize property. Even though |
63 * ByteBuffer.capacity() returns an int, we're using a long here |
63 * ByteBuffer.capacity() returns an int, we're using a long here |
64 * for potential future-proofing. |
64 * for potential future-proofing. |
65 */ |
65 */ |
66 private static long getMaxCachedBufferSize() { |
66 private static long getMaxCachedBufferSize() { |
67 String s = GetPropertyAction.getProperty("jdk.nio.maxCachedBufferSize"); |
67 String s = GetPropertyAction |
|
68 .privilegedGetProperty("jdk.nio.maxCachedBufferSize"); |
68 if (s != null) { |
69 if (s != null) { |
69 try { |
70 try { |
70 long m = Long.parseLong(s); |
71 long m = Long.parseLong(s); |
71 if (m >= 0) { |
72 if (m >= 0) { |
72 return m; |
73 return m; |
463 |
464 |
464 static boolean atBugLevel(String bl) { // package-private |
465 static boolean atBugLevel(String bl) { // package-private |
465 if (bugLevel == null) { |
466 if (bugLevel == null) { |
466 if (!jdk.internal.misc.VM.isBooted()) |
467 if (!jdk.internal.misc.VM.isBooted()) |
467 return false; |
468 return false; |
468 String value = GetPropertyAction.getProperty("sun.nio.ch.bugLevel"); |
469 String value = GetPropertyAction |
|
470 .privilegedGetProperty("sun.nio.ch.bugLevel"); |
469 bugLevel = (value != null) ? value : ""; |
471 bugLevel = (value != null) ? value : ""; |
470 } |
472 } |
471 return bugLevel.equals(bl); |
473 return bugLevel.equals(bl); |
472 } |
474 } |
473 |
475 |