ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/PriorityQueue.java
(Generate patch)

Comparing jsr166/src/main/java/util/PriorityQueue.java (file contents):
Revision 1.63 by jsr166, Tue Mar 7 07:11:39 2006 UTC vs.
Revision 1.64 by jsr166, Sun Mar 19 01:00:40 2006 UTC

# Line 688 | Line 688 | public class PriorityQueue<E> extends Ab
688          // Write out array length, for compatibility with 1.5 version
689          s.writeInt(Math.max(2, size + 1));
690  
691 <        // Write out all elements in the proper order.
691 >        // Write out all elements in the "proper order".
692          for (int i = 0; i < size; i++)
693              s.writeObject(queue[i]);
694      }
# Line 709 | Line 709 | public class PriorityQueue<E> extends Ab
709  
710          queue = new Object[size];
711  
712 <        // Read in all elements in the proper order.
712 >        // Read in all elements.
713          for (int i = 0; i < size; i++)
714              queue[i] = s.readObject();
715 +
716 +        // Elements are guaranteed to be in "proper order", but the
717 +        // spec has never explained what that might be.
718 +        heapify();
719      }
720   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines