Fix for CustomDeclarationOrderCheck_issue#190 (setters treating) #193

merged 1 commit into from Jul 7, 2014


None yet

6 participants


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) {
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 commented Jul 3, 2014

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

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

isopov commented Jul 3, 2014

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

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 commented Jul 4, 2014

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


@alexkravin, please fix:
Failure caused by your NestedTernaryCheck updates. NestedTernaryCheck update should go in a separate Pull Request, we already discussed that.


Fixed. Updates with NestedTernaryCheck were removed from this Pull Request


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
@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