/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadLocalRandomTest.java | 54 ThreadLocalRandom.current().setSeed(17); in testSetSeed() 63 int f = ThreadLocalRandom.current().nextInt(); in testNextInt() 65 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f) in testNextInt() 74 long f = ThreadLocalRandom.current().nextLong(); 76 while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f) 85 boolean f = ThreadLocalRandom.current().nextBoolean(); 87 while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f) 96 float f = ThreadLocalRandom.current().nextFloat(); 98 while (i < NCALLS && ThreadLocalRandom.current().nextFloat() == f) 107 double f = ThreadLocalRandom.current().nextDouble(); [all …]
|
D | ThreadTest.java | 38 Thread current = Thread.currentThread(); in testGetAndSetUncaughtExceptionHandler() local 39 ThreadGroup tg = current.getThreadGroup(); in testGetAndSetUncaughtExceptionHandler() 41 assertSame(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 42 current.setUncaughtExceptionHandler(eh); in testGetAndSetUncaughtExceptionHandler() 44 assertSame(eh, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler() 46 current.setUncaughtExceptionHandler(null); in testGetAndSetUncaughtExceptionHandler() 48 assertSame(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler()
|
D | ThreadLocalRandom8Test.java | 43 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamSize() 60 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamBounds() 77 ThreadLocalRandom r = ThreadLocalRandom.current(); in testIntsCount() 92 ThreadLocalRandom r = ThreadLocalRandom.current(); in testLongsCount() 107 ThreadLocalRandom r = ThreadLocalRandom.current(); in testDoublesCount() 122 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedInts() 141 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedLongs() 160 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedDoubles() 179 ThreadLocalRandom r = ThreadLocalRandom.current(); in testUnsizedIntsCount() 190 ThreadLocalRandom r = ThreadLocalRandom.current(); in testUnsizedLongsCount() [all …]
|
D | ExecutorsTest.java | 313 Thread current = Thread.currentThread(); in testDefaultThreadFactory() 314 assertTrue(!current.isDaemon()); in testDefaultThreadFactory() 315 assertTrue(current.getPriority() <= Thread.NORM_PRIORITY); in testDefaultThreadFactory() 316 ThreadGroup g = current.getThreadGroup(); in testDefaultThreadFactory() 322 String name = current.getName(); in testDefaultThreadFactory() 351 Thread current = Thread.currentThread(); in testPrivilegedThreadFactory() 352 assertTrue(!current.isDaemon()); in testPrivilegedThreadFactory() 353 assertTrue(current.getPriority() <= Thread.NORM_PRIORITY); in testPrivilegedThreadFactory() 354 ThreadGroup g = current.getThreadGroup(); in testPrivilegedThreadFactory() 360 String name = current.getName(); in testPrivilegedThreadFactory() [all …]
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | OldDateFormatTest.java | 93 Date current = new Date(); in test_formatLjava_util_Date() local 94 String dtf = format.format(current); in test_formatLjava_util_Date() 96 assertTrue("Incorrect date format", sdf.format(current).equals(dtf)); in test_formatLjava_util_Date() 113 Date current = new Date(); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() local 116 StringBuffer sb = format.format(current, toAppend, fp); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 118 assertTrue("Incorrect date format", sdf.format(current).equals( in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() 222 Date current = new Date(); in test_parseLString() local 225 Date date = format.parse(format.format(current).toString()); in test_parseLString() 226 assertEquals(current.getDate(), date.getDate()); in test_parseLString() 227 assertEquals(current.getDay(), date.getDay()); in test_parseLString() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicMarkableReference.java | 120 Pair<V> current = pair; in compareAndSet() local 122 expectedReference == current.reference && in compareAndSet() 123 expectedMark == current.mark && in compareAndSet() 124 ((newReference == current.reference && in compareAndSet() 125 newMark == current.mark) || in compareAndSet() 126 casPair(current, Pair.of(newReference, newMark))); in compareAndSet() 136 Pair<V> current = pair; in set() local 137 if (newReference != current.reference || newMark != current.mark) in set() 155 Pair<V> current = pair; in attemptMark() local 157 expectedReference == current.reference && in attemptMark() [all …]
|
D | AtomicStampedReference.java | 120 Pair<V> current = pair; in compareAndSet() local 122 expectedReference == current.reference && in compareAndSet() 123 expectedStamp == current.stamp && in compareAndSet() 124 ((newReference == current.reference && in compareAndSet() 125 newStamp == current.stamp) || in compareAndSet() 126 casPair(current, Pair.of(newReference, newStamp))); in compareAndSet() 136 Pair<V> current = pair; in set() local 137 if (newReference != current.reference || newStamp != current.stamp) in set() 155 Pair<V> current = pair; in attemptStamp() local 157 expectedReference == current.reference && in attemptStamp() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | ReentrantReadWriteLock.java | 365 Thread current = Thread.currentThread(); in tryAcquire() local 370 if (w == 0 || current != getExclusiveOwnerThread()) in tryAcquire() 381 setExclusiveOwnerThread(current); in tryAcquire() 386 Thread current = Thread.currentThread(); in tryReleaseShared() local 387 if (firstReader == current) { in tryReleaseShared() 395 if (rh == null || rh.tid != getThreadId(current)) in tryReleaseShared() 437 Thread current = Thread.currentThread(); in tryAcquireShared() local 440 getExclusiveOwnerThread() != current) in tryAcquireShared() 447 firstReader = current; in tryAcquireShared() 449 } else if (firstReader == current) { in tryAcquireShared() [all …]
|
D | ReentrantLock.java | 104 final Thread current = Thread.currentThread(); in nonfairTryAcquire() local 108 setExclusiveOwnerThread(current); in nonfairTryAcquire() 112 else if (current == getExclusiveOwnerThread()) { in nonfairTryAcquire() 209 final Thread current = Thread.currentThread(); in tryAcquire() local 214 setExclusiveOwnerThread(current); in tryAcquire() 218 else if (current == getExclusiveOwnerThread()) { in tryAcquire()
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | Semaphore.java | 166 int current = getState(); in tryReleaseShared() local 167 int next = current + releases; in tryReleaseShared() 168 if (next < current) // overflow in tryReleaseShared() 170 if (compareAndSetState(current, next)) in tryReleaseShared() 177 int current = getState(); in reducePermits() local 178 int next = current - reductions; in reducePermits() 179 if (next > current) // underflow in reducePermits() 181 if (compareAndSetState(current, next)) in reducePermits() 188 int current = getState(); in drainPermits() local 189 if (current == 0 || compareAndSetState(current, 0)) in drainPermits() [all …]
|
D | LinkedBlockingQueue.java | 734 private Node<E> current; field in LinkedBlockingQueue.Itr 741 current = head.next; in Itr() 742 if (current != null) in Itr() 743 currentElement = current.item; in Itr() 750 return current != null; in hasNext() 756 if (current == null) in next() 758 lastRet = current; in next() 763 for (Node<E> p = current, q;; p = q) { in next() 767 current = q; in next() 803 Node<E> current; // current node; null until initialized field in LinkedBlockingQueue.LBQSpliterator [all …]
|
/libcore/ojluni/src/main/java/java/util/regex/ |
D | Pattern.java | 1286 int current = 0; in quote() local 1287 while ((slashEIndex = s.indexOf("\\E", current)) != -1) { in quote() 1288 sb.append(s.substring(current, slashEIndex)); in quote() 1289 current = slashEIndex + 2; in quote() 1292 sb.append(s.substring(current, s.length())); in quote() 1395 private int current; in splitAsStream() field in Pattern.MatcherIterator 1423 if (current == input.length()) in splitAsStream() 1429 nextElement = input.subSequence(current, matcher.start()).toString(); in splitAsStream() 1430 current = matcher.end(); in splitAsStream() 1433 } else if (current > 0) { // no empty leading substring for zero-width in splitAsStream() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ThreadGroupTest.java | 282 ThreadGroup current = testRoot; in test_getParent() local 289 current = new ThreadGroup(current, "level " + i); in test_getParent() 290 groups.addElement(current); in test_getParent() 295 current = groups.elementAt(i); in test_getParent() 297 assertTrue("Parent is wrong", current.getParent() == previous); in test_getParent() 434 ThreadGroup current = testRoot; in test_setMaxPriorityI() local 436 current = new ThreadGroup(current, "level " + i); in test_setMaxPriorityI() 442 current = testRoot; in test_setMaxPriorityI() 448 current.setMaxPriority(current.getParent().getMaxPriority() - 1); in test_setMaxPriorityI() 451 maxPrio = current.getMaxPriority(); in test_setMaxPriorityI() [all …]
|
/libcore/ojluni/src/main/java/java/sql/ |
D | SQLException.java | 289 SQLException current = this; in setNextException() local 291 SQLException next=current.next; in setNextException() 293 current = next; in setNextException() 297 if (nextUpdater.compareAndSet(current,null,ex)) { in setNextException() 300 current=current.next; in setNextException()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Properties.java | 654 int current = 0; in writeComments() local 659 while (current < len) { in writeComments() 660 char c = comments.charAt(current); in writeComments() 662 if (last != current) in writeComments() 663 bw.write(comments.substring(last, current)); in writeComments() 673 current != len - 1 && in writeComments() 674 comments.charAt(current + 1) == '\n') { in writeComments() 675 current++; in writeComments() 677 if (current == len - 1 || in writeComments() 678 (comments.charAt(current + 1) != '#' && in writeComments() [all …]
|
D | HashMap.java | 834 HashMapEntry<K,V> current; // current entry field in HashMap.HashIterator 861 current = e; in nextEntry() 866 if (current == null) in remove() 870 Object k = current.key; in remove() 871 current = null; in remove() 900 HashMapEntry<K,V> current; // current entry field in HashMap.HashMapSpliterator 944 return (lo >= mid || current != null) ? null : in trySplit() 962 (i = index) >= 0 && (i < (index = hi) || current != null)) { in forEachRemaining() 963 HashMapEntry<K,V> p = current; in forEachRemaining() 964 current = null; in forEachRemaining() [all …]
|
D | WeakHashMap.java | 1040 WeakHashMap.Entry<K,V> current; // current node field in WeakHashMap.WeakHashMapSpliterator 1101 (i < (index = hi) || current != null)) { in forEachRemaining() 1102 WeakHashMap.Entry<K,V> p = current; in forEachRemaining() 1103 current = null; // exhaust in forEachRemaining() 1128 while (current != null || index < hi) { in tryAdvance() 1129 if (current == null) in tryAdvance() 1130 current = tab[index++]; in tryAdvance() 1132 Object x = current.get(); in tryAdvance() 1133 current = current.next; in tryAdvance() 1181 (i < (index = hi) || current != null)) { in forEachRemaining() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | AttributedCharacterIteratorTest.java | 33 assertEquals("Wrong first", 'T', it.current()); in test_current() 35 assertEquals("Wrong second", 'e', it.current()); in test_current() 38 assertEquals("Wrong last", 'g', it.current()); in test_current() 40 assertTrue("Wrong final", it.current() == CharacterIterator.DONE); in test_current() 43 assertEquals("Wrong first2", 's', it.current()); in test_current() 151 assertEquals("Wrong first", '2', it.current()); in test_setIndexI()
|
D | StringCharacterIteratorTest.java | 166 assertEquals('f', fixture.current()); in test_current() 168 assertEquals('i', fixture.current()); in test_current() 172 assertEquals("Wrong current char", 'i', it.current()); in test_current() 300 it1.current() == CharacterIterator.DONE); in test_next() 345 assertEquals("Wrong current char", 's', it1.current()); in test_previous() 359 assertEquals('f', fixture.current()); in test_setIndex() 361 assertEquals('e', fixture.current()); in test_setIndex() 383 assertEquals('f', fixture.current()); in test_setText() 411 assertEquals("Wrong current char", 't', it.current()); in test_ConstructorLjava_lang_String() 424 assertEquals("Wrong current char", 't', it.current()); in test_ConstructorLjava_lang_StringI() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | StringCharacterIterator.java | 129 return current(); in first() 143 return current(); in last() 155 return current(); in setIndex() 162 public char current() in current() method in StringCharacterIterator
|
D | IcuIteratorWrapper.java | 374 public int current() { in current() method in IcuIteratorWrapper 375 return wrapped.current(); in current() 401 newText.current(); in setText()
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | InternalLocaleBuilder.java | 150 String s = itr.current(); in setUnicodeLocaleKeyword() 196 String s = itr.current(); in setExtension() 241 String s = itr.current(); in setExtensions() 249 s = itr.current(); in setExtensions() 273 String s = itr.current(); in setExtensions() 280 s = itr.current(); in setExtensions() 509 … if (LocaleUtils.caseIgnoreMatch(itr.current(), LanguageTag.PRIVUSE_VARIANT_PREFIX)) { in getBaseLocale() 558 if (LocaleUtils.caseIgnoreMatch(itr.current(), LanguageTag.PRIVUSE_VARIANT_PREFIX)) { in removePrivateuseVariant() 578 String s = itr.current(); in checkVariants() 605 if (!UnicodeLocaleExtension.isAttribute(itr.current())) { in setUnicodeLocaleExtension() [all …]
|
D | LanguageTag.java | 212 String s = itr.current(); in parse() 235 String s = itr.current(); in parseLanguage() 254 String s = itr.current(); in parseExtlangs() 282 String s = itr.current(); in parseScript() 300 String s = itr.current(); in parseRegion() 319 String s = itr.current(); in parseVariants() 343 String s = itr.current(); in parseExtensions() 351 s = itr.current(); in parseExtensions() 386 String s = itr.current(); in parsePrivateuse() 393 s = itr.current(); in parsePrivateuse() [all …]
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipOutputStream.java | 56 private XEntry current; field in ZipOutputStream 177 if (current != null) { in putNextEntry() 220 current = new XEntry(e, written); in putNextEntry() 221 xentries.add(current); in putNextEntry() 222 writeLOC(current); in putNextEntry() 233 if (current != null) { in closeEntry() 234 ZipEntry e = current.entry; in closeEntry() 286 current = null; in closeEntry() 309 if (current == null) { in write() 312 ZipEntry entry = current.entry; in write() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | IdentityScope2Test.java | 77 Identity current = (Identity) en.nextElement(); in getIdentity() local 78 if (current.getName().equals(name)) in getIdentity() 79 return current; in getIdentity() 87 Identity current = (Identity) en.nextElement(); in getIdentity() local 88 if (current.getPublicKey() == pk) in getIdentity() 89 return current; in getIdentity()
|