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

Fix for CustomDeclarationOrderCheck_issue#190 (setters treating) #193

Merged

Conversation

@alexkravin
Copy link
Contributor

@alexkravin alexkravin commented Jul 3, 2014

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
Copy link

@vaReliy vaReliy commented Jul 3, 2014

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

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

@isopov
Copy link
Member

@isopov isopov commented Jul 3, 2014

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

@vaReliy
Copy link

@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
Copy link
Member

@romani romani commented Jul 4, 2014

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

@daniilyar
Copy link
Member

@daniilyar daniilyar commented Jul 5, 2014

@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
Copy link
Contributor Author

@alexkravin alexkravin commented Jul 6, 2014

Fixed. Updates with NestedTernaryCheck were removed from this Pull Request

@coveralls
Copy link

@coveralls coveralls commented Jul 6, 2014

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
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.