/libcore/ojluni/src/main/java/sun/misc/ |
D | Version.java | 274 CharSequence cs = System.getProperty("java.vm.version"); in initVersions() local 275 if (cs.length() >= 5 && in initVersions() 276 Character.isDigit(cs.charAt(0)) && cs.charAt(1) == '.' && in initVersions() 277 Character.isDigit(cs.charAt(2)) && cs.charAt(3) == '.' && in initVersions() 278 Character.isDigit(cs.charAt(4))) { in initVersions() 279 jvm_major_version = Character.digit(cs.charAt(0), 10); in initVersions() 280 jvm_minor_version = Character.digit(cs.charAt(2), 10); in initVersions() 281 jvm_micro_version = Character.digit(cs.charAt(4), 10); in initVersions() 282 cs = cs.subSequence(5, cs.length()); in initVersions() 283 if (cs.charAt(0) == '_' && cs.length() >= 3) { in initVersions() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ExecutorCompletionServiceTest.java | 88 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testSubmitNullCallable() local 90 cs.submit((Callable) null); in testSubmitNullCallable() 99 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testSubmitNullRunnable() local 101 cs.submit((Runnable) null, Boolean.TRUE); in testSubmitNullRunnable() 111 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testTake() local 112 cs.submit(new StringTask()); in testTake() 113 Future f = cs.take(); in testTake() 122 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testTake2() local 123 Future f1 = cs.submit(new StringTask()); in testTake2() 124 Future f2 = cs.take(); in testTake2() [all …]
|
D | ExecutorCompletionService9Test.java | 63 CompletionService<Integer> cs in solveAll() local 65 solvers.forEach(cs::submit); in solveAll() 67 Integer r = cs.take().get(); in solveAll() 76 CompletionService<Integer> cs in solveAny() local 82 solvers.forEach(solver -> futures.add(cs.submit(solver))); in solveAny() 85 Integer r = cs.take().get(); in solveAny()
|
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/ |
D | LongAdder.java | 86 Cell[] cs; long b, v; int m; Cell c; in add() local 87 if ((cs = cells) != null || !casBase(b = base, b + x)) { in add() 89 if (cs == null || (m = cs.length - 1) < 0 || in add() 90 (c = cs[getProbe() & m]) == null || in add() 120 Cell[] cs = cells; in sum() local 122 if (cs != null) { in sum() 123 for (Cell c : cs) in sum() 138 Cell[] cs = cells; in reset() local 140 if (cs != null) { in reset() 141 for (Cell c : cs) in reset() [all …]
|
D | DoubleAdder.java | 90 Cell[] cs; long b, v; int m; Cell c; in add() local 91 if ((cs = cells) != null || in add() 96 if (cs == null || (m = cs.length - 1) < 0 || in add() 97 (c = cs[getProbe() & m]) == null || in add() 118 Cell[] cs = cells; in sum() local 120 if (cs != null) { in sum() 121 for (Cell c : cs) in sum() 136 Cell[] cs = cells; in reset() local 138 if (cs != null) { in reset() 139 for (Cell c : cs) in reset() [all …]
|
D | LongAccumulator.java | 106 Cell[] cs; long b, v, r; int m; Cell c; in accumulate() local 107 if ((cs = cells) != null in accumulate() 111 if (cs == null in accumulate() 112 || (m = cs.length - 1) < 0 in accumulate() 113 || (c = cs[getProbe() & m]) == null in accumulate() 131 Cell[] cs = cells; in get() local 133 if (cs != null) { in get() 134 for (Cell c : cs) in get() 150 Cell[] cs = cells; in reset() local 152 if (cs != null) { in reset() [all …]
|
D | DoubleAccumulator.java | 108 Cell[] cs; long b, v, r; int m; Cell c; in accumulate() local 109 if ((cs = cells) != null in accumulate() 114 if (cs == null in accumulate() 115 || (m = cs.length - 1) < 0 in accumulate() 116 || (c = cs[getProbe() & m]) == null in accumulate() 136 Cell[] cs = cells; in get() local 138 if (cs != null) { in get() 139 for (Cell c : cs) in get() 156 Cell[] cs = cells; in reset() local 158 if (cs != null) { in reset() [all …]
|
D | Striped64.java | 239 Cell[] cs; Cell c; int n; long v; in longAccumulate() local 240 if ((cs = cells) != null && (n = cs.length) > 0) { in longAccumulate() 241 if ((c = cs[(n - 1) & h]) == null) { in longAccumulate() 266 else if (n >= NCPU || cells != cs) in longAccumulate() 272 if (cells == cs) // Expand table unless stale in longAccumulate() 273 cells = Arrays.copyOf(cs, n << 1); in longAccumulate() 282 else if (cellsBusy == 0 && cells == cs && casCellsBusy()) { in longAccumulate() 284 if (cells == cs) { in longAccumulate() 323 Cell[] cs; Cell c; int n; long v; in doubleAccumulate() local 324 if ((cs = cells) != null && (n = cs.length) > 0) { in doubleAccumulate() [all …]
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | Charset.java | 50 import sun.nio.cs.ThreadLocalCoders; 333 private static void cache(String charsetName, Charset cs) { in cache() argument 335 String canonicalName = cs.name(); in cache() 339 cs = canonicalCharset; in cache() 341 cache2.put(canonicalName, cs); in cache() 343 for (String alias : cs.aliases()) { in cache() 344 cache2.put(alias, cs); in cache() 348 cache2.put(charsetName, cs); in cache() 351 cache1 = new AbstractMap.SimpleImmutableEntry<>(charsetName, cs); in cache() 432 Charset cs = cp.charsetForName(charsetName); in lookupViaProviders() local [all …]
|
D | CharsetEncoder.java | 187 CharsetEncoder(Charset cs, in CharsetEncoder() argument 193 this(cs, averageBytesPerChar, maxBytesPerChar, replacement, false); in CharsetEncoder() 202 …protected CharsetEncoder(Charset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] repl… in CharsetEncoder() argument 206 this.charset = cs; in CharsetEncoder() 249 protected CharsetEncoder(Charset cs, in CharsetEncoder() argument 253 this(cs, in CharsetEncoder() 1007 public boolean canEncode(CharSequence cs) { in canEncode() argument 1009 if (cs instanceof CharBuffer) in canEncode() 1010 cb = ((CharBuffer)cs).duplicate(); in canEncode() 1014 cb = CharBuffer.wrap(cs); in canEncode()
|
/libcore/ojluni/src/main/java/java/security/ |
D | SecureClassLoader.java | 140 CodeSource cs) in defineClass() argument 142 return defineClass(name, b, off, len, getProtectionDomain(cs)); in defineClass() 172 CodeSource cs) in defineClass() argument 174 return defineClass(name, b, getProtectionDomain(cs)); in defineClass() 198 private ProtectionDomain getProtectionDomain(CodeSource cs) { in getProtectionDomain() argument 199 if (cs == null) in getProtectionDomain() 204 pd = pdcache.get(cs); in getProtectionDomain() 206 PermissionCollection perms = getPermissions(cs); in getProtectionDomain() 207 pd = new ProtectionDomain(cs, perms, this, null); in getProtectionDomain() 208 pdcache.put(cs, pd); in getProtectionDomain()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetTest.java | 48 Charset cs = Charset.forName(charsetName); in test_allAvailableCharsets() local 49 assertNotNull(cs.newDecoder()); in test_allAvailableCharsets() 50 if (cs.canEncode()) { in test_allAvailableCharsets() 51 CharsetEncoder enc = cs.newEncoder(); in test_allAvailableCharsets() 83 Charset cs = Charset.forName(name); in test_isRegistered() local 84 if (!cs.isRegistered()) { in test_isRegistered() 85 … System.err.println("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases()); in test_isRegistered() 87 …assertTrue("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases(), cs.isRegis… in test_isRegistered() 91 Charset cs = Charset.forName(name); in test_isRegistered() local 92 …assertFalse("isRegistered was true for " + name + " " + cs.name() + " " + cs.aliases(), cs.isRegis… in test_isRegistered() [all …]
|
D | CharsetEncoder2Test.java | 40 Charset cs = Charset.forName("UTF-8"); //$NON-NLS-1$ in test_ConstructorLjava_nio_charset_CharsetFF() local 41 new MockCharsetEncoderForHarmony141(cs, 1.1f, 1); in test_ConstructorLjava_nio_charset_CharsetFF() 48 Charset cs = Charset.forName("ISO8859-1"); //$NON-NLS-1$ in test_ConstructorLjava_nio_charset_CharsetFF() local 49 new MockCharsetEncoderForHarmony141(cs, 1.1f, 1, in test_ConstructorLjava_nio_charset_CharsetFF() 73 protected MockCharsetEncoderForHarmony141(Charset cs, in MockCharsetEncoderForHarmony141() argument 75 super(cs, averageBytesPerChar, maxBytesPerChar); in MockCharsetEncoderForHarmony141() 78 public MockCharsetEncoderForHarmony141(Charset cs, in MockCharsetEncoderForHarmony141() argument 81 super(cs, averageBytesPerChar, maxBytesPerChar, replacement); in MockCharsetEncoderForHarmony141() 109 MockMalfunctionCharset cs = new MockMalfunctionCharset("mock", null); in test_EncodeLjava_nio_CharBuffer() local 111 cs.encode(CharBuffer.wrap("AB")); in test_EncodeLjava_nio_CharBuffer() [all …]
|
D | CharsetDecoder2Test.java | 44 Charset cs = Charset.forName("UTF-8"); //$NON-NLS-1$ in test_ConstructorLjava_nio_charset_CharsetFF() local 45 new MockCharsetDecoderForHarmony142(cs, 1.1f, 1); in test_ConstructorLjava_nio_charset_CharsetFF() 56 protected MockCharsetDecoderForHarmony142(Charset cs, in MockCharsetDecoderForHarmony142() argument 58 super(cs, averageBytesPerChar, maxBytesPerChar); in MockCharsetDecoderForHarmony142() 137 public boolean contains(Charset cs) { in contains() argument 155 public MockMalfunctionDecoder(Charset cs) { in MockMalfunctionDecoder() argument 156 super(cs, 1, 10); in MockMalfunctionDecoder() 169 public MockMalfunctionEncoder(Charset cs) { in MockMalfunctionEncoder() argument 170 super(cs, 1, 3, new byte[] { (byte) '?' }); in MockMalfunctionEncoder() 184 Charset cs = Charset.forName("UTF-8"); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() local [all …]
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | Collector.java | 268 Set<Characteristics> cs = (characteristics.length == 0) in of() local 272 return new Collectors.CollectorImpl<>(supplier, accumulator, combiner, cs); in of() 301 Set<Characteristics> cs = Collectors.CH_NOID; in of() local 303 cs = EnumSet.noneOf(Characteristics.class); in of() 304 Collections.addAll(cs, characteristics); in of() 305 cs = Collections.unmodifiableSet(cs); in of() 307 return new Collectors.CollectorImpl<>(supplier, accumulator, combiner, finisher, cs); in of()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldDatagramPacketTest.java | 46 DatagramSocket cs = new DatagramSocket(); in test_getPort() local 50 cs.send(packet); in test_getPort() 51 cs.setSoTimeout(3000); in test_getPort() 52 cs.receive(packet); in test_getPort() 53 cs.close(); in test_getPort() 56 cs.close(); in test_getPort()
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetTest.java | 24 Charset cs = Charset.forName("UTF8"); in test_nonstandardCharsetName() local 25 assertNotNull(cs); in test_nonstandardCharsetName() 26 assertEquals("UTF-8", cs.name()); in test_nonstandardCharsetName() 44 Charset cs = Charset.forName(name); in run() local 45 if (!name.equals(cs.name())) { in run()
|
/libcore/ojluni/src/test/java/io/Writer/ |
D | NullWriter.java | 73 CharSequence cs = "abc"; in testAppendCharSequence() local 74 assertSame(openWriter, openWriter.append(cs)); in testAppendCharSequence() 84 CharSequence cs = "abc"; in testAppendCharSequenceII() local 85 assertSame(openWriter, openWriter.append(cs, 0, 1)); in testAppendCharSequenceII() 125 CharSequence cs = "abc"; in testAppendCharSequenceClosed() local 126 closedWriter.append(cs); in testAppendCharSequenceClosed() 136 CharSequence cs = "abc"; in testAppendCharSequenceIIClosed() local 137 closedWriter.append(cs, 0, 1); in testAppendCharSequenceIIClosed()
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipCoder.java | 37 import sun.nio.cs.ArrayDecoder; 38 import sun.nio.cs.ArrayEncoder; 127 private Charset cs; field in ZipCoder 133 private ZipCoder(Charset cs) { in ZipCoder() argument 134 this.cs = cs; in ZipCoder() 135 this.isUTF8 = cs.name().equals(StandardCharsets.UTF_8.name()); in ZipCoder() 144 dec = cs.newDecoder() in decoder() 153 enc = cs.newEncoder() in encoder()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OutputStreamWriterTest.java | 55 char[] cs = new char[8192/4 + 1]; in testFlush() local 56 Arrays.fill(cs, 'x'); in testFlush() 57 cs[cs.length - 1] = '\ud842'; // One half of a surrogate pair (the other being U+df9f). in testFlush() 58 writer.write(cs, 0, cs.length); in testFlush()
|
/libcore/luni/src/test/java/tests/java/security/ |
D | SecureClassLoaderTest.java | 191 CodeSource cs = new CodeSource(url, (Certificate[]) null); in testGetPermissions() local 194 ldr.getPerms(cs); in testGetPermissions() 235 public Class define(String name, ByteBuffer b, CodeSource cs) { in define() argument 236 return defineClass(name, b, cs); in define() 240 CodeSource cs) { in define() argument 241 return defineClass(name, b, off, len, cs); in define()
|
/libcore/ojluni/src/main/java/sun/nio/cs/ |
D | StreamEncoder.java | 29 package sun.nio.cs; 66 Charset cs) in forOutputStreamWriter() argument 68 return new StreamEncoder(out, lock, cs); in forOutputStreamWriter() 161 private Charset cs; field in StreamEncoder 174 private StreamEncoder(OutputStream out, Object lock, Charset cs) { in StreamEncoder() argument 176 cs.newEncoder() in StreamEncoder() 185 this.cs = enc.charset(); in StreamEncoder() 202 this.cs = enc.charset(); in StreamEncoder() 328 return ((cs instanceof HistoricallyNamedCharset) in encodingName() 329 ? ((HistoricallyNamedCharset)cs).historicalName() in encodingName() [all …]
|
D | StreamDecoder.java | 30 package sun.nio.cs; 79 Charset cs) in forInputStreamReader() argument 81 return new StreamDecoder(in, lock, cs); in forInputStreamReader() 225 private Charset cs; field in StreamDecoder 233 StreamDecoder(InputStream in, Object lock, Charset cs) { in StreamDecoder() argument 235 cs.newDecoder() in StreamDecoder() 242 this.cs = dec.charset(); in StreamDecoder() 263 this.cs = dec.charset(); in StreamDecoder() 401 return ((cs instanceof HistoricallyNamedCharset) in encodingName() 402 ? ((HistoricallyNamedCharset)cs).historicalName() in encodingName() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 49 public EvilCharsetDecoder(Charset cs) { in EvilCharsetDecoder() argument 50 super(cs, 1.0f, 1.0f); in EvilCharsetDecoder() 71 public EvilCharsetEncoder(Charset cs) { in EvilCharsetEncoder() argument 72 super(cs, 1.0f, 1.0f); in EvilCharsetEncoder() 123 Charset cs = EVIL_CHARSET; in testStringFromCharset_MaliciousCharset() local 125 final String result = new String(bytes, cs); in testStringFromCharset_MaliciousCharset() 141 Charset cs = Charset.forName("UTF-8"); in test_getBytes_UTF_8() local 144 assertEquals("[]", Arrays.toString("".getBytes(cs))); in test_getBytes_UTF_8() 147 assertEquals("[0]", Arrays.toString("\u0000".getBytes(cs))); in test_getBytes_UTF_8() 148 assertEquals("[127]", Arrays.toString("\u007f".getBytes(cs))); in test_getBytes_UTF_8() [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | InputStreamReader.java | 30 import sun.nio.cs.StreamDecoder; 108 public InputStreamReader(InputStream in, Charset cs) { in InputStreamReader() argument 110 if (cs == null) in InputStreamReader() 112 sd = StreamDecoder.forInputStreamReader(in, this, cs); in InputStreamReader()
|