--- jsr166/src/test/tck/DelayQueueTest.java 2012/02/21 02:04:17 1.60 +++ jsr166/src/test/tck/DelayQueueTest.java 2013/05/30 03:28:55 1.62 @@ -62,6 +62,8 @@ public class DelayQueueTest extends JSR1 return (other instanceof PDelay) && this.pseudodelay == ((PDelay)other).pseudodelay; } + // suppress [overrides] javac warning + public int hashCode() { return pseudodelay; } public long getDelay(TimeUnit ignore) { return Integer.MIN_VALUE + pseudodelay; } @@ -97,6 +99,9 @@ public class DelayQueueTest extends JSR1 return other.trigger == trigger; } + // suppress [overrides] javac warning + public int hashCode() { return (int) trigger; } + public long getDelay(TimeUnit unit) { long n = trigger - System.nanoTime(); return unit.convert(n, TimeUnit.NANOSECONDS); @@ -646,7 +651,7 @@ public class DelayQueueTest extends JSR1 public void realRun() throws InterruptedException { assertNull(q.poll()); threadsStarted.await(); - assertTrue(null != q.poll(LONG_DELAY_MS, MILLISECONDS)); + assertNotNull(q.poll(LONG_DELAY_MS, MILLISECONDS)); checkEmpty(q); }});