Skip to content

[java] corrected invalid reporting of LoD violation #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

wje600
Copy link

@wje600 wje600 commented Feb 20, 2017

Please, prefix the PR title with the language it applies to within brackets, such as [java] or [apex]. If not specific to a language, you can use [core]

Before submitting a PR, please check that:

  • The PR is submitted against master. The PMD team will merge back to support branches as needed.
  • mvn test passes.
  • mvn checkstyle:check passes. Check this for more info

PR Description:
Corrected issue where LawOfDemeter exceptions were being reported erroneously if additional (unrelated) assignments occurred later in the same block (method). (See new test for an example of a condition that causes erroneous error reporting.)

Fixes #270

@jsotuyod jsotuyod changed the title *[java]* corrected invalid reporting of LoD violation [java] corrected invalid reporting of LoD violation Feb 21, 2017
@jsotuyod jsotuyod self-assigned this Feb 22, 2017
@jsotuyod jsotuyod added the a:bug PMD crashes or fails to analyse a file. label Feb 22, 2017
@jsotuyod jsotuyod added this to the 5.4.5 milestone Feb 22, 2017
jsotuyod added a commit to jsotuyod/pmd that referenced this pull request Feb 22, 2017
@jsotuyod jsotuyod merged commit 60afb23 into pmd:master Feb 22, 2017
@jsotuyod
Copy link
Member

@wje600 thanks for the amazing PR! This will be included in PMD 5.4.5, PMD 5.5.4 and later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug PMD crashes or fails to analyse a file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[java] LoD false positive
2 participants