nikam14 opened a new pull request, #3865: URL: https://github.com/apache/eventmesh/pull/3865
<!-- ### Contribution Checklist - Name the pull request in the form "[ISSUE #XXXX] Title of the pull request", where *XXXX* should be replaced by the actual issue number. Skip *[ISSUE #XXXX]* if there is no associated github issue for this pull request. - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review. - Each pull request should address only one issue. Please do not mix up code from multiple issues. - Each commit in the pull request should have a meaningful commit message. - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below. (The sections below can be removed for hotfixes of typos) --> <!-- (If this PR fixes a GitHub issue, please add `Fixes #<XXX>` or `Closes #<XXX>`.) --> Fixes #2997 . ### Motivation This line is in the form of String str = str.equals("someOtherString"); A NullPointerException may occur if the String variable str is null. ### Modifications If instead the code was restructured to String str = "someOtherString".equals(str);that is, call equals() on the string literal, passing the variable as an argument, then this exception could never happen as both equals() check for null. ### Documentation - Does this pull request introduce a new feature? (no) -- 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: dev-unsubscr...@eventmesh.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@eventmesh.apache.org For additional commands, e-mail: dev-h...@eventmesh.apache.org