On Wed, 10 Jun 2026 13:58:12 GMT, Liam Miller-Cushon <[email protected]> wrote:
>> This commit adds a `PriorityQueue` constructor that takes both a custom >> comparator and an existing collection. >> >> See previous discussion in https://github.com/openjdk/jdk/pull/17045. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Liam Miller-Cushon has updated the pull request incrementally with one > additional commit since the last revision: > > Update copyright year, remove author name src/java.base/share/classes/java/util/PriorityQueue.java line 227: > 225: */ > 226: public PriorityQueue(Collection<? extends E> c, > 227: Comparator<? super E> comparator) { What if `c` is a PriorityQueue and `comparator` is its Comparator? test/jdk/java/util/concurrent/tck/PriorityQueueTest.java line 201: > 199: mustEqual(q1.poll(), q2.poll()); > 200: } > 201: No tests to verify behavior or `null` collection or `null` comparator? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31452#discussion_r3393990587 PR Review Comment: https://git.openjdk.org/jdk/pull/31452#discussion_r3394001116
