On Thu, 30 May 2024 18:38:59 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>> In fact, this started simply for incorporating JLine implementation into 
>> Console, and using ServiceLoader was a mere means to load its impl as it 
>> resides outside the java.base module. So yes, module and its console 
>> implementation is 1:1, which is reflected by the system property 
>> `jdk.console` that takes the module name. So that `break;` effectively 
>> shortcut the unnecessary looping (I don't think it would happen btw).
>> That said, I think it needs to be described in the comment above that piece 
>> of code. I will add it shortly.
>
> So, it's the previous (stream) version that was more permissive and 
> inadvertently so, yes?

Yes, correct. If hypothetically Jline provided two impls, it were not specified 
which impl was used. Now we only use the first one found.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19467#discussion_r1621284108

Reply via email to