Skip to content

Modify MoveInstanceMethodProcessor to check for possible null comparison#3082

Merged
jjohnstn merged 1 commit into
eclipse-jdt:masterfrom
jjohnstn:nullcheck
Jul 14, 2026
Merged

Modify MoveInstanceMethodProcessor to check for possible null comparison#3082
jjohnstn merged 1 commit into
eclipse-jdt:masterfrom
jjohnstn:nullcheck

Conversation

@jjohnstn

Copy link
Copy Markdown
Contributor

What it does

See issue.

How to test

See issue or new test.

Author checklist

- add new MoveInstanceMethodProcessor.checkTargetNullCheck() to check
  if the method being moved compares the field to use against null
  which will be replaced by a comparison of "this" to null
- add new test to MoveInstanceMethodTests
- fixes eclipse-jdt#3035
@jjohnstn jjohnstn added the bug Something isn't working label Jul 14, 2026
@jjohnstn jjohnstn added this to the 4.41 M2 milestone Jul 14, 2026
@jjohnstn jjohnstn self-assigned this Jul 14, 2026
@jjohnstn
jjohnstn merged commit cbb6d57 into eclipse-jdt:master Jul 14, 2026
13 checks passed
@jjohnstn
jjohnstn deleted the nullcheck branch July 14, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Instance Method changes null-check semantics and causes NullPointerException

1 participant