Fix for CustomDeclarationOrderCheck_issue#190 (setters treating) #193

Merged
merged 1 commit into from Jul 7, 2014

Projects

None yet

6 participants

@alexkravin
Contributor

Updated Check to treat more kind of methods as setters.
E.g., now Check treats 'set' method as setter, in cases like:
public void setWorkMode(String workMode) {
this.workMode = WorkMode.valueOf(workMode);
}
public void setUserCache(UserCache userCache) {
super.setUserCache(userCache);
}
public void setY(Integer y) { // setter
this.y = Integer.parseInt(y + "");
}

Currently, if there's assignment with method call and in case if there's calling setter from the super class

@vaReliy
vaReliy commented Jul 3, 2014

Why so complicated in setY():
'this.y = Integer.parseInt(y + "");',

instead of simple:
'this.y = y;' ?

@isopov
Member
isopov commented Jul 3, 2014

Because this is not the actual code, but the test input for code parser.

@vaReliy
vaReliy commented Jul 3, 2014

Oh, thanks for answer.
But, I did not quite understand: method takes the Integer..
Maybe will come with experience.. :)

@romani
Member
romani commented Jul 4, 2014

build is failed.
@daniilyar, please merge this PR as it become valid.

@daniilyar
Member

@alexkravin, please fix: https://travis-ci.org/sevntu-checkstyle/sevntu.checkstyle/builds/29065206
Failure caused by your NestedTernaryCheck updates. NestedTernaryCheck update should go in a separate Pull Request, we already discussed that.

@alexkravin
Contributor

Fixed. Updates with NestedTernaryCheck were removed from this Pull Request

@coveralls

Coverage Status

Coverage increased (+0.02%) when pulling f69c2a1 on alexkravin:CustomDeclarationOrder_#190 into a1c2d2a on sevntu-checkstyle:master.

@daniilyar daniilyar merged commit f69c2a1 into sevntu-checkstyle:master Jul 7, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@alexkravin alexkravin deleted the alexkravin:CustomDeclarationOrder_#190 branch Jul 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment