On Mon, 1 Aug 2022 19:59:33 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

> The existing code downstream of the check handles an empty glob or regex 
> pattern as matching the empty string.
> If I read it correctly, it will now throw an exception instead of not 
> matching. It might be safer to not change that behavior.

I'm 99% sure the original intention was for the empty pattern to be rejected 
with IAE. It was an implementation but that it checked if the index is length 
rather than length-1. That was JDK 7 and changing is now without be behavior 
change. I can't imagine the impact would be significant but I agree it's not 
worth it and maybe we just drop the check as per the JBS issue and update the 
spec to document the long standing behavior.

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

PR: https://git.openjdk.org/jdk/pull/9595

Reply via email to