Home
last modified time | relevance | path

Searched refs:current (Results 1 – 25 of 85) sorted by relevance

1234

/libcore/jsr166-tests/src/test/java/jsr166/
DThreadLocalRandomTest.java54 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 …]
DThreadTest.java38 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()
DThreadLocalRandom8Test.java43 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 …]
DExecutorsTest.java313 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/
DOldDateFormatTest.java93 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 …]
DDateFormatTest.java52 final Date current = new Date(1468250177000L); // 20160711 15:16:17 GMT in checkTimePattern() local
54 String actualDateString = format.format(current); in checkTimePattern()
56 String expectedDateString = sdf.format(current); in checkTimePattern()
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
DAtomicMarkableReference.java149 Pair<V> current = pair; in compareAndSet() local
151 expectedReference == current.reference && in compareAndSet()
152 expectedMark == current.mark && in compareAndSet()
153 ((newReference == current.reference && in compareAndSet()
154 newMark == current.mark) || in compareAndSet()
155 casPair(current, Pair.of(newReference, newMark))); in compareAndSet()
165 Pair<V> current = pair; in set() local
166 if (newReference != current.reference || newMark != current.mark) in set()
184 Pair<V> current = pair; in attemptMark() local
186 expectedReference == current.reference && in attemptMark()
[all …]
DAtomicStampedReference.java149 Pair<V> current = pair; in compareAndSet() local
151 expectedReference == current.reference && in compareAndSet()
152 expectedStamp == current.stamp && in compareAndSet()
153 ((newReference == current.reference && in compareAndSet()
154 newStamp == current.stamp) || in compareAndSet()
155 casPair(current, Pair.of(newReference, newStamp))); in compareAndSet()
165 Pair<V> current = pair; in set() local
166 if (newReference != current.reference || newStamp != current.stamp) in set()
184 Pair<V> current = pair; in attemptStamp() local
186 expectedReference == current.reference && in attemptStamp()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DReentrantReadWriteLock.java394 Thread current = Thread.currentThread(); in tryAcquire() local
399 if (w == 0 || current != getExclusiveOwnerThread()) in tryAcquire()
410 setExclusiveOwnerThread(current); in tryAcquire()
415 Thread current = Thread.currentThread(); in tryReleaseShared() local
416 if (firstReader == current) { in tryReleaseShared()
424 if (rh == null || rh.tid != getThreadId(current)) in tryReleaseShared()
466 Thread current = Thread.currentThread(); in tryAcquireShared() local
469 getExclusiveOwnerThread() != current) in tryAcquireShared()
476 firstReader = current; in tryAcquireShared()
478 } else if (firstReader == current) { in tryAcquireShared()
[all …]
DReentrantLock.java133 final Thread current = Thread.currentThread(); in nonfairTryAcquire() local
137 setExclusiveOwnerThread(current); in nonfairTryAcquire()
141 else if (current == getExclusiveOwnerThread()) { in nonfairTryAcquire()
241 final Thread current = Thread.currentThread(); in tryAcquire() local
246 setExclusiveOwnerThread(current); in tryAcquire()
250 else if (current == getExclusiveOwnerThread()) { in tryAcquire()
/libcore/ojluni/src/main/java/java/util/concurrent/
DSemaphore.java195 int current = getState(); in tryReleaseShared() local
196 int next = current + releases; in tryReleaseShared()
197 if (next < current) // overflow in tryReleaseShared()
199 if (compareAndSetState(current, next)) in tryReleaseShared()
206 int current = getState(); in reducePermits() local
207 int next = current - reductions; in reducePermits()
208 if (next > current) // underflow in reducePermits()
210 if (compareAndSetState(current, next)) in reducePermits()
217 int current = getState(); in drainPermits() local
218 if (current == 0 || compareAndSetState(current, 0)) in drainPermits()
[all …]
DLinkedBlockingQueue.java763 private Node<E> current; field in LinkedBlockingQueue.Itr
770 current = head.next; in Itr()
771 if (current != null) in Itr()
772 currentElement = current.item; in Itr()
779 return current != null; in hasNext()
785 if (current == null) in next()
787 lastRet = current; in next()
792 for (Node<E> p = current, q;; p = q) { in next()
796 current = q; in next()
832 Node<E> current; // current node; null until initialized field in LinkedBlockingQueue.LBQSpliterator
[all …]
/libcore/ojluni/src/main/java/java/util/regex/
DPattern.java1335 int current = 0; in quote() local
1336 while ((slashEIndex = s.indexOf("\\E", current)) != -1) { in quote()
1337 sb.append(s.substring(current, slashEIndex)); in quote()
1338 current = slashEIndex + 2; in quote()
1341 sb.append(s.substring(current, s.length())); in quote()
1488 private int current; in splitAsStream() field in Pattern.MatcherIterator
1516 if (current == input.length()) in splitAsStream()
1522 nextElement = input.subSequence(current, matcher.start()).toString(); in splitAsStream()
1523 current = matcher.end(); in splitAsStream()
1526 } 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/
DThreadGroupTest.java283 ThreadGroup current = testRoot; in test_getParent() local
290 current = new ThreadGroup(current, "level " + i); in test_getParent()
291 groups.addElement(current); in test_getParent()
296 current = groups.elementAt(i); in test_getParent()
298 assertTrue("Parent is wrong", current.getParent() == previous); in test_getParent()
435 ThreadGroup current = testRoot; in test_setMaxPriorityI() local
437 current = new ThreadGroup(current, "level " + i); in test_setMaxPriorityI()
443 current = testRoot; in test_setMaxPriorityI()
449 current.setMaxPriority(current.getParent().getMaxPriority() - 1); in test_setMaxPriorityI()
452 maxPrio = current.getMaxPriority(); in test_setMaxPriorityI()
[all …]
/libcore/ojluni/src/main/java/java/sql/
DSQLException.java289 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/
DProperties.java661 int current = 0; in writeComments() local
666 while (current < len) { in writeComments()
667 char c = comments.charAt(current); in writeComments()
669 if (last != current) in writeComments()
670 bw.write(comments.substring(last, current)); in writeComments()
680 current != len - 1 && in writeComments()
681 comments.charAt(current + 1) == '\n') { in writeComments()
682 current++; in writeComments()
684 if (current == len - 1 || in writeComments()
685 (comments.charAt(current + 1) != '#' && in writeComments()
[all …]
DWeakHashMap.java1064 WeakHashMap.Entry<K,V> current; // current node field in WeakHashMap.WeakHashMapSpliterator
1125 (i < (index = hi) || current != null)) { in forEachRemaining()
1126 WeakHashMap.Entry<K,V> p = current; in forEachRemaining()
1127 current = null; // exhaust in forEachRemaining()
1152 while (current != null || index < hi) { in tryAdvance()
1153 if (current == null) in tryAdvance()
1154 current = tab[index++]; in tryAdvance()
1156 Object x = current.get(); in tryAdvance()
1157 current = current.next; in tryAdvance()
1205 (i < (index = hi) || current != null)) { in forEachRemaining()
[all …]
/libcore/dalvik/src/main/java/dalvik/system/
DBaseDexClassLoader.java144 ClassLoader current = getParent(); in reportClassLoaderChain() local
146 while (current != null && current != bootClassLoader) { in reportClassLoaderChain()
147 classLoadersChain.add(current); in reportClassLoaderChain()
148 if (current instanceof BaseDexClassLoader) { in reportClassLoaderChain()
149 BaseDexClassLoader bdcCurrent = (BaseDexClassLoader) current; in reportClassLoaderChain()
155 current = current.getParent(); in reportClassLoaderChain()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DAttributedCharacterIteratorTest.java33 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()
DStringCharacterIteratorTest.java166 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/
DStringCharacterIterator.java131 return current(); in first()
145 return current(); in last()
157 return current(); in setIndex()
164 public char current() in current() method in StringCharacterIterator
DIcuIteratorWrapper.java374 public int current() { in current() method in IcuIteratorWrapper
375 return wrapped.current(); in current()
401 newText.current(); in setText()
/libcore/ojluni/src/test/java/nio/file/attribute/
DBasicFileAttributeViewCreationTimeTest.java103 FileTime current = creationTime(file); in test() local
104 if (!current.equals(creationTime)) in test()
117 FileTime current = creationTime(file); in test() local
118 if (Math.abs(creationTime.toMillis()-current.toMillis()) > 1000L) in test()
/libcore/ojluni/src/main/java/sun/util/locale/
DInternalLocaleBuilder.java150 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()
510 … if (LocaleUtils.caseIgnoreMatch(itr.current(), LanguageTag.PRIVUSE_VARIANT_PREFIX)) { in getBaseLocale()
559 if (LocaleUtils.caseIgnoreMatch(itr.current(), LanguageTag.PRIVUSE_VARIANT_PREFIX)) { in removePrivateuseVariant()
579 String s = itr.current(); in checkVariants()
606 if (!UnicodeLocaleExtension.isAttribute(itr.current())) { in setUnicodeLocaleExtension()
[all …]
DLanguageTag.java212 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 …]

1234