Home
last modified time | relevance | path

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

123456

/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 …]
/libcore/luni/src/test/java/libcore/java/text/
DOldDateFormatTest.java95 Date current = new Date(); in test_formatLjava_util_Date() local
96 String dtf = format.format(current); in test_formatLjava_util_Date()
99 assertEquals("Incorrect date format", sdf.format(current), dtf); in test_formatLjava_util_Date()
118 Date current = new Date(); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() local
121 StringBuffer sb = format.format(current, toAppend, fp); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
124 assertEquals("Incorrect date format", sdf.format(current), sb.toString()); in test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition()
227 Date current = new Date(); in test_parseLString() local
230 Date date = format.parse(format.format(current).toString()); in test_parseLString()
231 assertEquals(current.getDate(), date.getDate()); in test_parseLString()
232 assertEquals(current.getDay(), date.getDay()); in test_parseLString()
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DThreadLocalRandomTest.java92 ThreadLocalRandom.current().setSeed(17); in testSetSeed()
104 ThreadLocalRandom rnd = ThreadLocalRandom.current(); in testNext()
147 int f = ThreadLocalRandom.current().nextInt();
149 while (i < NCALLS && ThreadLocalRandom.current().nextInt() == f)
159 long f = ThreadLocalRandom.current().nextLong();
161 while (i < NCALLS && ThreadLocalRandom.current().nextLong() == f)
171 boolean f = ThreadLocalRandom.current().nextBoolean();
173 while (i < NCALLS && ThreadLocalRandom.current().nextBoolean() == f)
183 float f = ThreadLocalRandom.current().nextFloat();
185 while (i < NCALLS && ThreadLocalRandom.current().nextFloat() == f)
[all …]
DThreadLocalRandom8Test.java81 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamSize()
99 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBadStreamBounds()
117 ThreadLocalRandom r = ThreadLocalRandom.current(); in testIntsCount()
133 ThreadLocalRandom r = ThreadLocalRandom.current(); in testLongsCount()
149 ThreadLocalRandom r = ThreadLocalRandom.current(); in testDoublesCount()
165 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedInts()
185 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedLongs()
205 ThreadLocalRandom r = ThreadLocalRandom.current(); in testBoundedDoubles()
225 ThreadLocalRandom r = ThreadLocalRandom.current(); in testUnsizedIntsCount()
237 ThreadLocalRandom r = ThreadLocalRandom.current(); in testUnsizedLongsCount()
[all …]
DThreadTest.java78 Thread current = Thread.currentThread(); in testGetAndSetUncaughtExceptionHandler() local
79 ThreadGroup tg = current.getThreadGroup(); in testGetAndSetUncaughtExceptionHandler()
81 assertSame(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler()
82 current.setUncaughtExceptionHandler(eh); in testGetAndSetUncaughtExceptionHandler()
84 assertSame(eh, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler()
86 current.setUncaughtExceptionHandler(null); in testGetAndSetUncaughtExceptionHandler()
88 assertSame(tg, current.getUncaughtExceptionHandler()); in testGetAndSetUncaughtExceptionHandler()
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/
DAtomicMarkableReference.java150 Pair<V> current = pair; in compareAndSet() local
152 expectedReference == current.reference && in compareAndSet()
153 expectedMark == current.mark && in compareAndSet()
154 ((newReference == current.reference && in compareAndSet()
155 newMark == current.mark) || in compareAndSet()
156 casPair(current, Pair.of(newReference, newMark))); in compareAndSet()
166 Pair<V> current = pair; in set() local
167 if (newReference != current.reference || newMark != current.mark) in set()
185 Pair<V> current = pair; in attemptMark() local
187 expectedReference == current.reference && in attemptMark()
[all …]
DAtomicStampedReference.java150 Pair<V> current = pair; in compareAndSet() local
152 expectedReference == current.reference && in compareAndSet()
153 expectedStamp == current.stamp && in compareAndSet()
154 ((newReference == current.reference && in compareAndSet()
155 newStamp == current.stamp) || in compareAndSet()
156 casPair(current, Pair.of(newReference, newStamp))); in compareAndSet()
166 Pair<V> current = pair; in set() local
167 if (newReference != current.reference || newStamp != current.stamp) in set()
185 Pair<V> current = pair; in attemptStamp() local
187 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()
416 Thread current = Thread.currentThread(); in tryReleaseShared() local
417 if (firstReader == current) { in tryReleaseShared()
426 rh.tid != LockSupport.getThreadId(current)) in tryReleaseShared()
469 Thread current = Thread.currentThread(); in tryAcquireShared() local
472 getExclusiveOwnerThread() != current) in tryAcquireShared()
479 firstReader = current; in tryAcquireShared()
481 } else if (firstReader == current) { in tryAcquireShared()
[all …]
DReentrantLock.java126 Thread current = Thread.currentThread(); in tryLock() local
130 setExclusiveOwnerThread(current); in tryLock()
133 } else if (getExclusiveOwnerThread() == current) { in tryLock()
224 Thread current = Thread.currentThread(); in initialTryLock() local
226 setExclusiveOwnerThread(current); in initialTryLock()
228 } else if (getExclusiveOwnerThread() == current) { in initialTryLock()
260 Thread current = Thread.currentThread(); in initialTryLock() local
264 setExclusiveOwnerThread(current); in initialTryLock()
267 } else if (getExclusiveOwnerThread() == current) { in initialTryLock()
/libcore/ojluni/src/test/java/text/BreakIterator/
DExceptionTest.java64 check(bi.current(), mirror.current()); in main()
69 check(bi.current(), mirror.current()); in main()
74 check(bi.current(), mirror.current()); in main()
85 check(bi.current(), mirror.current()); in main()
90 check(bi.current(), mirror.current()); in main()
95 check(bi.current(), mirror.current()); in main()
103 check(bi.current(), mirror.current()); in main()
DBug4533872.java64 int start, end, current; field in Bug4533872
127 current = iter.current(); in TestPrintEachForward()
128 if (start != current) { in TestPrintEachForward()
130 current + ", expected(=first())=" + start); in TestPrintEachForward()
139 current = iter.current(); in TestPrintEachForward()
140 if (end != current) { in TestPrintEachForward()
142 current + ", expected(=next())=" + end); in TestPrintEachForward()
166 current = iter.current(); in TestPrintEachBackward()
167 if (end != current) { in TestPrintEachBackward()
169 current + ", expected(=last())=" + end); in TestPrintEachBackward()
[all …]
/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 …]
/libcore/ojluni/src/test/java/text/testlib/
DHexDumpReader.java86 private byte[] current; field in HexDumpReader.ByteArrayBuilder
91 current = new byte[BUFFER_SIZE]; in ByteArrayBuilder()
96 bytes.add(current); in put()
97 current = new byte[BUFFER_SIZE]; in put()
100 current[offset++] = b; in put()
111 System.arraycopy(current, 0, buf, ptr, offset); in toArray()
/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/util/regex/
DPattern.java1323 int current = 0; in quote() local
1325 sb.append(s, current, slashEIndex) in quote()
1327 current = slashEIndex + 2; in quote()
1328 } while ((slashEIndex = s.indexOf("\\E", current)) != -1); in quote()
1330 return sb.append(s, current, s.length()) in quote()
5714 private int current; in splitAsStream() field in Pattern.MatcherIterator
5754 if (current == input.length()) in splitAsStream()
5760 nextElement = input.subSequence(current, matcher.start()).toString(); in splitAsStream()
5761 current = matcher.end(); in splitAsStream()
5764 } else if (current > 0) { // no empty leading substring for zero-width in splitAsStream()
[all …]
/libcore/ojluni/src/test/java/lang/StackWalker/
DStackWalkTest.java192 public void call(int total, int current, int markAt) { in call() argument
194 if (current < total) { in call()
195 testCall.call(total, current+1, markAt); in call()
204 public void call(int total, int current, int markAt) { in call() argument
206 if (current < total) { in call()
207 testCall.call(total, current+1, markAt); in call()
217 public void call(int total, int current, int markAt) { in call() argument
219 if (current < total) { in call()
220 int nexti = current + 1; in call()
230 public void call2(int total, int current, int markAt) { in call2() argument
[all …]
/libcore/ojluni/src/main/java/java/util/
DWeakHashMap.java1071 WeakHashMap.Entry<K,V> current; // current node field in WeakHashMap.WeakHashMapSpliterator
1132 (i < (index = hi) || current != null)) { in forEachRemaining()
1133 WeakHashMap.Entry<K,V> p = current; in forEachRemaining()
1134 current = null; // exhaust in forEachRemaining()
1159 while (current != null || index < hi) { in tryAdvance()
1160 if (current == null) in tryAdvance()
1161 current = tab[index++]; in tryAdvance()
1163 Object x = current.get(); in tryAdvance()
1164 current = current.next; in tryAdvance()
1212 (i < (index = hi) || current != null)) { in forEachRemaining()
[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/tools/upstream/
Dpkg-status110 def __init__(self, baseline, release, current, upstream) -> None: argument
113 self.current = current
126 if repo == self.current:
128 self.android_build_top, self.current, relpath)
139 return self.java_dir(self.current, pkg)
200 print(file.current_sum, file.current)
216 self.current = package.current_path(name)
221 self.current_sum = self.checksum(self.current)
358 current_copyright = self.get_copyright(self.current)
416 config = MergeConfig(args.baseline, args.release, args.current,
/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()
/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 …]
/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/java/text/
DStringCharacterIterator.java132 return current(); in first()
146 return current(); in last()
158 return current(); in setIndex()
165 public char current() in current() method in StringCharacterIterator

123456