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

UniquePropertiesCheck.getLineNumber should be private #4694

Closed
romani opened this Issue Jul 10, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@romani
Member

romani commented Jul 10, 2017

Checks are not designed for extension in general, so protected usage is discouraged
especially static protected
protected static int getLineNumber(FileText fileText, String keyName) {
https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/checks/UniquePropertiesCheck.java#L104

should become private protected. UTs should be updated to use Check public methods to test functionality.

@djydewang

This comment has been minimized.

Show comment
Hide comment
@djydewang

djydewang Jul 12, 2017

Contributor

Is it OK to test functionality by using reflection?

Contributor

djydewang commented Jul 12, 2017

Is it OK to test functionality by using reflection?

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Jul 12, 2017

Member

@djydewang Yes, if there is no other way we are fine with reflection.

Member

rnveach commented Jul 12, 2017

@djydewang Yes, if there is no other way we are fine with reflection.

djydewang added a commit to djydewang/checkstyle that referenced this issue Jul 12, 2017

djydewang added a commit to djydewang/checkstyle that referenced this issue Jul 12, 2017

djydewang added a commit to djydewang/checkstyle that referenced this issue Jul 12, 2017

djydewang added a commit to djydewang/checkstyle that referenced this issue Jul 12, 2017

djydewang added a commit to djydewang/checkstyle that referenced this issue Jul 13, 2017

djydewang added a commit to djydewang/checkstyle that referenced this issue Jul 13, 2017

djydewang added a commit to djydewang/checkstyle that referenced this issue Jul 13, 2017

romani added a commit that referenced this issue Jul 13, 2017

@romani romani added this to the 8.1 milestone Jul 13, 2017

@romani romani closed this Jul 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment