You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "paulk-asert (via GitHub)" <gi...@apache.org> on 2023/05/16 22:16:39 UTC
[GitHub] [groovy] paulk-asert commented on pull request #1885: fix for NPE
paulk-asert commented on PR #1885:
URL: https://github.com/apache/groovy/pull/1885#issuecomment-1550427924
After the proposed change, the code will still be prone to a NPE if called with a null 'key'.
What about using the following as the replacement for the condition in question:
{code}
Objects.equals(key, listKeys[i])
{code}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org