-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 checkstyle issue with redundant public keyword #26
Conversation
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
d6fbf9e
to
5c86414
Compare
Looks good to me. We'll have to fix all projects, though. I think Manuel already did that for Graal. |
to be honest, I think having default modifiers in all kinds of places will take some getting used to. |
Yeah, the other option would be disabling the rule, I guess. Perhaps @jtulach has a more informed opinion. One of the considerations I found is about code evolution. So, it indicates more explicitly the visibility of the constructor when the class visibility is changed: http://stackoverflow.com/a/243276/916546 |
I like the removal of public constructors from non-public classes. Having them public is misleading. |
Fix checkstyle issue with redundant public keyword
I fixed these issues for Graal and JVMCI. We probably still have to clean up new violations before upgrading Checkstyle. |
…uffle:nodeclass_cleanup to master * commit 'ce0dc4c77915817754f92f9625f28ccdfe04741c': Update sigtest snapshot Remove NodeField interface and add equivalent methods to NodeClass instead Sort node fields by kind, so that iteration can be stopped early Replace assertAssignable with more descriptive IllegalArgumentException Deprecate NodeFieldAccessor Introduce NodeClass.NodeField as replacement for NodeFieldAccessor Remove child and children field arrays and rewrite NodeIterator to not need them NodeClass cleanup SL: avoid use of Node.getChildren()
The latest Eclipse Checkstyle plugin (version 6.14) flagged
public
andprivate
keywords as redundant on inner classes that are declared for instance as private.It also flagged redundant static keywords for enum, because they are implicitly static.
Note, this is a rather crosscutting change that touches quite a bit of code. This should probably be carefully considered before merging.
Since there are quite a few places also in Graal that have these issues, it might not be desirable to change it all at once (Eclipse has a quick fix feature, but it didn't work for me). Here the patch to mx, that worked for me (note, no 6.14.1 jar on lafo yet.