Re: RFR: 6356745: Introduce constructor for PriorityQueue with existing collection and custom comparator [v2]

2023-12-17 Thread Chen Liang
On Thu, 14 Dec 2023 20:36:50 GMT, Valeh Hajiyev wrote: >> This commit addresses the current limitation in the `PriorityQueue` >> implementation, which lacks a constructor to efficiently create a priority >> queue with a custom comparator and an existing collection. In order to >> create such a

Re: RFR: 6356745: Introduce constructor for PriorityQueue with existing collection and custom comparator [v2]

2023-12-17 Thread Alan Bateman
On Thu, 14 Dec 2023 20:36:50 GMT, Valeh Hajiyev wrote: >> This commit addresses the current limitation in the `PriorityQueue` >> implementation, which lacks a constructor to efficiently create a priority >> queue with a custom comparator and an existing collection. In order to >> create such a

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-15 Thread Alan Bateman
On 14/12/2023 10:55, Viktor Klang wrote: I presume that the precondition to have the original collection be pre-ordered according to the supplied Comparator can be verified by checking before adding each element in the collection to the PQ that it compareTo equal-or-greater to the previous one?

Re: RFR: 6356745: Introduce constructor for PriorityQueue with existing collection and custom comparator [v2]

2023-12-14 Thread Pavel Rappo
On Thu, 14 Dec 2023 22:18:35 GMT, Valeh Hajiyev wrote: > @AlanBateman thanks for having a look. would you be able to create a CRS > request as I don't have permission to do so? You may not be able to create one, but you sure can look at some. If you do so, you'll see that obtaining a permissio

Re: RFR: 6356745: Introduce constructor for PriorityQueue with existing collection and custom comparator [v2]

2023-12-14 Thread Valeh Hajiyev
On Thu, 14 Dec 2023 20:36:50 GMT, Valeh Hajiyev wrote: >> This commit addresses the current limitation in the `PriorityQueue` >> implementation, which lacks a constructor to efficiently create a priority >> queue with a custom comparator and an existing collection. In order to >> create such a

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Valeh Hajiyev
One more request – Current PR cannot be merged without CRS. Could someone please help me to create a CSR request for the issue below? https://bugs.openjdk.org/browse/JDK-6356745 Unfortunately, I don't have permission to create a CSR request. -Valeh On Thu, Dec 14, 2023 at 9:40 PM Archie Cobbs

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Archie Cobbs
Looks great - thanks (I'm not an official reviewer so I can't approve it though). -Archie On Thu, Dec 14, 2023 at 2:37 PM Valeh Hajiyev wrote: > Yes, there's no such precondition. Thanks for having a look, I updated the > javadoc as you suggested, and linked it to the old existing ticket. It's

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Valeh Hajiyev
Yes, there's no such precondition. Thanks for having a look, I updated the javadoc as you suggested, and linked it to the old existing ticket. It's now ready for review. I would appreciate if you could have a look again. Cheers, Valeh On Thu, Dec 14, 2023 at 4:22 PM Archie Cobbs wrote: > On Th

Re: RFR: 6356745: Introduce constructor for PriorityQueue with existing collection and custom comparator [v2]

2023-12-14 Thread Valeh Hajiyev
> This commit addresses the current limitation in the `PriorityQueue` > implementation, which lacks a constructor to efficiently create a priority > queue with a custom comparator and an existing collection. In order to create > such a queue, we currently need to initialize a new queue with cust

RFR: 6356745: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Valeh Hajiyev
--- Commit messages: - fix styling - Introduce constructor for PriorityQueue with existing collection and custom comparator Changes: https://git.openjdk.org/jdk/pull/17045/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17045&range=00 Issue: https://bugs.openjdk.org/browse/JDK-63

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Archie Cobbs
On Thu, Dec 14, 2023 at 4:56 AM Viktor Klang wrote: > I presume that the precondition to have the original collection be > pre-ordered according to the supplied Comparator can be verified by > checking before adding each element in the collection to the PQ that it > compareTo equal-or-greater to

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Viktor Klang
Architect, Java Platform Group Oracle From: core-libs-dev on behalf of Pavel Rappo Sent: Thursday, 14 December 2023 10:55 To: Valeh Hajiyev Cc: core-libs-dev@openjdk.org Subject: Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Pavel Rappo
You might want to use this older, unresolved, duplicated bug for your PR: https://bugs.openjdk.org/browse/JDK-6356745 > On 13 Dec 2023, at 23:37, Valeh Hajiyev wrote: > > Hi Pavel, > > Thanks for the reply. If I understand correctly, I need this change to be > discussed in one of the mailing

Re: [External] : Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread Pavel Rappo
Like David said earlier, this is the correct list. However, given the festive season, expect some delays in communication. > On 13 Dec 2023, at 23:37, Valeh Hajiyev wrote: > > Hi Pavel, > > Thanks for the reply. If I understand correctly, I need this change to be > discussed in one of the mai

Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-14 Thread David Holmes
The current mailing list, core-libs-dev, is the correct one. Cheers, David On 14/12/2023 9:37 am, Valeh Hajiyev wrote: Hi Pavel, Thanks for the reply. If I understand correctly, I need this change to be discussed in one of the mailing lists there, so that someone would sponsor me to create a

Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-13 Thread Valeh Hajiyev
Hi Pavel, Thanks for the reply. If I understand correctly, I need this change to be discussed in one of the mailing lists there, so that someone would sponsor me to create a tracking issue in JBS. Do you know which mailing list is the most relevant for me to propose the change? Thanks, Valeh On

Re: Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-13 Thread Pavel Rappo
Sorry, there's a necessary process that a PR must follow. You seem to have signed OCA already. For the rest, see this resource: https://openjdk.org/guide/. In particular, this part: https://openjdk.org/guide/#contributing-to-an-openjdk-project. -Pavel > On 13 Dec 2023, at 23:09, Valeh Hajiyev

Introduce constructor for PriorityQueue with existing collection and custom comparator

2023-12-13 Thread Valeh Hajiyev
Hi all, I have raised the following PR, could someone please help me to get it merged? https://github.com/openjdk/jdk/pull/17045 *More details:* *This commit addresses the current limitation in the `PriorityQueue` implementation, which lacks a constructor to efficiently create a prio