--- jsr166/src/main/java/util/PriorityQueue.java 2003/08/25 23:47:01 1.32 +++ jsr166/src/main/java/util/PriorityQueue.java 2003/08/27 01:33:50 1.34 @@ -37,7 +37,7 @@ * Multiple threads should not access a PriorityQueue * instance concurrently if any of the threads modifies the list * structurally. Instead, use the thread-safe {@link - * java.util.concurrent.BlockingPriorityQueue} class. + * java.util.concurrent.PriorityBlockingQueue} class. * * *

Implementation note: this implementation provides O(log(n)) time @@ -517,7 +517,7 @@ public class PriorityQueue extends Ab private void fixDown(int k) { int j; if (comparator == null) { - while ((j = k << 1) <= size && j > 0) { + while ((j = k << 1) <= size && (j > 0)) { if (j)queue[j]).compareTo((E)queue[j+1]) > 0) j++; // j indexes smallest kid if (((Comparable)queue[k]).compareTo((E)queue[j]) <= 0) @@ -526,7 +526,7 @@ public class PriorityQueue extends Ab k = j; } } else { - while ((j = k << 1) <= size && j > 0) { + while ((j = k << 1) <= size && (j > 0)) { if (j < size && comparator.compare((E)queue[j], (E)queue[j+1]) > 0) j++; // j indexes smallest kid if (comparator.compare((E)queue[k], (E)queue[j]) <= 0)