test/jdk/java/util/concurrent/BlockingQueue/DrainToFails.java
changeset 48541 946e34c2dec9
parent 47216 71c04702a3d5
child 55034 f46be958c4ac
equal deleted inserted replaced
48540:221cf8307606 48541:946e34c2dec9
    76         PDelay(int i) {
    76         PDelay(int i) {
    77             super(new Runnable() { public void run() {}}, null);
    77             super(new Runnable() { public void run() {}}, null);
    78             pseudodelay = i;
    78             pseudodelay = i;
    79         }
    79         }
    80         public int compareTo(PDelay other) {
    80         public int compareTo(PDelay other) {
    81             int a = this.pseudodelay;
    81             return Integer.compare(this.pseudodelay, other.pseudodelay);
    82             int b = other.pseudodelay;
       
    83             return (a < b) ? -1 : (a > b) ? 1 : 0;
       
    84         }
    82         }
    85         public int compareTo(Delayed y) {
    83         public int compareTo(Delayed y) {
    86             return compareTo((PDelay)y);
    84             return compareTo((PDelay)y);
    87         }
    85         }
    88         public boolean equals(Object other) {
    86         public boolean equals(Object other) {