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 [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 >> `List` interface by providing a more

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

2024-04-23 Thread xxDark
On Fri, 19 Apr 2024 22:20:48 GMT, Evemose 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 Yes, it does. If it

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 [v11]

2024-04-19 Thread xxDark
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 >> `List` interface by providing a more