Skip to content
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

LogicConditionNeedOptimizationCheck doesn't give violation when it is expected #367

Closed
rdiachenko opened this issue Jun 25, 2015 · 3 comments
Closed
Milestone

Comments

@rdiachenko
Copy link
Member

@rdiachenko rdiachenko commented Jun 25, 2015

The check gives violation on this code:

boolean found = lst.remove(elem);
found = lst.remove(elem) || found; // violation!!

but it skips the following code:

boolean found = lst.remove(elem);
found = (lst.remove(elem)) || found; // violation skipped!!

Reproduced on:
checkstyle 6.7
sevntu-checkstyle 1.13.5

@VadimPanasiuk
Copy link
Member

@VadimPanasiuk VadimPanasiuk commented Aug 6, 2015

I am on it

@VadimPanasiuk
Copy link
Member

@VadimPanasiuk VadimPanasiuk commented Aug 28, 2015

VadimPanasiuk added a commit to VadimPanasiuk/sevntu.checkstyle that referenced this issue Aug 28, 2015
romani added a commit that referenced this issue Sep 7, 2015
@romani romani added this to the 1.13.6 milestone Sep 7, 2015
@romani
Copy link
Member

@romani romani commented Sep 7, 2015

merged

@romani romani closed this Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.