On Tue, 9 Apr 2024 21:48:23 GMT, Evemose <d...@openjdk.org> wrote:

> One possible workaround is to temporally (for an intermidiate period) or 
> permanently delegate null value handing to indexOf(Object), which seems odd 
> for me to me tbh, although it preserves source compatibility.

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?
> he concern about change in behaviour of indexOf(null) is completely valid, 
> although indexOf(null) is kind of exotic scenario.

See 
[this](https://github.com/search?q=%22indexOf%28null%29%22+language%3AJava+&type=code)
 and 
[that](https://github.com/search?q=%22lastIndexOf%28null%29%22+language%3AJava+&type=code)
 query.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18639#issuecomment-2046118678

Reply via email to