From b9742daca70c395a2947767d163694d11c7caae7 Mon Sep 17 00:00:00 2001 From: Mike Duigou Date: Fri, 26 Jul 2013 17:23:20 -0700 Subject: [PATCH] 8021601: Add unit test for PriorityQueue(Comparator) constructor Reviewed-by: darcy, alanb --- jdk/src/share/classes/java/util/PriorityQueue.java | 4 ++-- jdk/test/java/util/PriorityQueue/RemoveContains.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/java/util/PriorityQueue.java b/jdk/src/share/classes/java/util/PriorityQueue.java index c5a961cdbe9..6a31f3ee292 100644 --- a/jdk/src/share/classes/java/util/PriorityQueue.java +++ b/jdk/src/share/classes/java/util/PriorityQueue.java @@ -136,8 +136,8 @@ public class PriorityQueue extends AbstractQueue } /** - * Creates a {@code PriorityQueue} with the default initial capacity - * that orders its elements according to the specified comparator. + * Creates a {@code PriorityQueue} with the default initial capacity and + * whose elements are ordered according to the specified comparator. * * @param comparator the comparator that will be used to order this * priority queue. If {@code null}, the {@linkplain Comparable diff --git a/jdk/test/java/util/PriorityQueue/RemoveContains.java b/jdk/test/java/util/PriorityQueue/RemoveContains.java index 8ac27a48492..66ae47e7f46 100644 --- a/jdk/test/java/util/PriorityQueue/RemoveContains.java +++ b/jdk/test/java/util/PriorityQueue/RemoveContains.java @@ -64,6 +64,7 @@ public class RemoveContains { public int compare(String x, String y) { return x.charAt(0) - y.charAt(0); }}; + test(new PriorityQueue(firstChar)); test(new PriorityQueue(10, firstChar)); test(new PriorityBlockingQueue(10, firstChar)); test(new ArrayBlockingQueue(10));