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

Closed
rdiachenko opened this Issue Jun 25, 2015 · 3 comments

Projects

None yet

3 participants

@rdiachenko
Member

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
Contributor

I am on it

@VadimPanasiuk
Contributor
@VadimPanasiuk VadimPanasiuk added a commit to VadimPanasiuk/sevntu.checkstyle that referenced this issue Aug 28, 2015
@VadimPanasiuk VadimPanasiuk Issue #367: Validation of the firstElement was removed 20e9861
@romani romani added this to the 1.13.6 milestone Sep 7, 2015
@romani
Member
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