Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods [v5]

2024-06-20 Thread Evemose
On Thu, 20 Jun 2024 12:11:25 GMT, Jorn Vernee wrote: >> This PR adds a new JDK tool, called `jnativescan`, that can be used to find >> code that accesses native functionality. Currently this includes `native` >> method declarations, and methods marked with `@Restricted`. >> >> The tool

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v15]

2024-04-25 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v14]

2024-04-25 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v13]

2024-04-24 Thread Evemose
On Wed, 24 Apr 2024 12:00:47 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v13]

2024-04-24 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v12]

2024-04-24 Thread Evemose
On Tue, 23 Apr 2024 13:54:42 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v12]

2024-04-24 Thread Evemose
On Tue, 23 Apr 2024 20:30:22 GMT, ExE Boss wrote: >> Evemose has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Added Objects import to sun List >> - Replaced on-demand import in com.sunList >>

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v11]

2024-04-23 Thread Evemose
On Fri, 19 Apr 2024 22:27:15 GMT, xxDark wrote: >>> I noticed that most (if not all) methods don't ensure non-nullability of >>> `filter` so NPE would only be thrown if the list is not empty. >> >> Yeah, thats true. not sure if it has to throw NPE even if list is emply > >> > I noticed that

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v2]

2024-04-23 Thread Evemose
On Fri, 19 Apr 2024 12:10:34 GMT, Chen Liang wrote: >> @minborg Sorry to bother you with this kind of question, but i cant manage >> to find where exactly and how I can file CSR review request. Could you help >> me out? > > @Evemose Please revert formatting cha

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v11]

2024-04-23 Thread Evemose
On Fri, 19 Apr 2024 15:49:11 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v11]

2024-04-23 Thread Evemose
On Fri, 19 Apr 2024 21:36:42 GMT, xxDark wrote: > I noticed that most (if not all) methods don't ensure non-nullability of > `filter` so NPE would only be thrown if the list is not empty. Yeah, thats true. not sure if it has to throw NPE even if list is emply - PR Comment:

Re: RFR: 8329760: Add indexOf(Predicate filter) to java.util.List interface [v12]

2024-04-23 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > use

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v10]

2024-04-19 Thread Evemose
On Fri, 19 Apr 2024 15:39:12 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v9]

2024-04-19 Thread Evemose
On Fri, 19 Apr 2024 14:11:20 GMT, Roger Riggs wrote: >> Evemose has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update Vector.java > > Please revert the formatting as soon as possible; its noise as far

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v11]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v10]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v9]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v8]

2024-04-19 Thread Evemose
On Fri, 19 Apr 2024 12:47:12 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v8]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v2]

2024-04-19 Thread Evemose
On Fri, 19 Apr 2024 12:10:34 GMT, Chen Liang wrote: >> @minborg Sorry to bother you with this kind of question, but i cant manage >> to find where exactly and how I can file CSR review request. Could you help >> me out? > > @Evemose Please revert formatting cha

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v7]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v6]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and >

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v5]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v4]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v3]

2024-04-19 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and > u

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v2]

2024-04-19 Thread Evemose
On Fri, 19 Apr 2024 09:39:40 GMT, Per Minborg wrote: >> Evemose has updated the pull request incrementally with one additional >> commit since the last revision: >> >> empty commit to trigger check rerun > > Adding (default) methods to `List` would

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v2]

2024-04-18 Thread Evemose
.reduce((first, second) -> second) > .orElse(-1); > System.out.println(index2); // Output: 2 > > > I believe these additions would greatly enhance the functionality and > flexibility of the `List` interface, making it more powerful and >

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread Evemose
On Tue, 9 Apr 2024 22:02:56 GMT, xxDark wrote: > This does not solve the problem though. Source compatibility would still be > broken as one would still need to add casts everywhere, or am I > misinterpreting something? The code you have provided in example is still valid and non-ambigous,

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread Evemose
On Wed, 10 Apr 2024 11:20:32 GMT, xxDark wrote: > Should be `findIndex`? Similarly with `findLastIndex`. Yeah i guess IDE didnt do a great job with refactor. I will review aall changes manually a bit later - PR Review Comment:

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread Evemose
On Tue, 9 Apr 2024 20:48:19 GMT, Chen Liang wrote: > A few remarks: > > 1. The concern on `indexOf(Object)` and `indexOf(Predicate)` is valid; > `Optional` has `orElse` vs. `orElseGet` to avoid these clashes. The behavior > change of `indexOf(null)` is a source incompatibility. > 2. Have you

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread Evemose
On Mon, 8 Apr 2024 03:57:33 GMT, ExE Boss wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >> `List` interface by providing a more

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread Evemose
On Fri, 5 Apr 2024 00:31:22 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >

RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread Evemose
**Subject** Addition of Predicate-based `indexOf` and `lastIndexOf` methods to `java.util.List` **Motivation** The motivation behind this proposal is to enhance the functionality of the `List` interface by providing a more flexible way to find the index of an element. Currently, the `indexOf`

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface

2024-04-18 Thread Evemose
On Fri, 5 Apr 2024 00:00:58 GMT, Evemose wrote: > **Subject** > Addition of Predicate-based `indexOf` and `lastIndexOf` methods to > `java.util.List` > > **Motivation** > The motivation behind this proposal is to enhance the functionality of the > `List` interface by prov