GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — [java] New Rule: MutableStaticState by vszholobov · Pull Request #3246 · pmd/pmd Conversation
|
Generated by 🚫 Danger |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Welcome and thanks for your contribution! I have a couple of suggestions, please take a look when you can.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Move MutableStaticState from security to design. Change description to clarify what "visible field" is. Change "since" attribute from 6.34.0 to 6.35.0. Add AssignmentToNonFinalStatic rule reference.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, please have a look at my comments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Change description to make it more soft and add reasoning why the non-private static non-final fields should be made constants or immutable references.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good to me!
Now the rule tests are also executed:
2021-05-18T18:00:27.2691443Z [INFO] Running net.sourceforge.pmd.lang.java.rule.design.MutableStaticStateTest
2021-05-18T18:00:27.2982628Z [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 s - in net.sourceforge.pmd.lang.java.rule.design.MutableStaticStateTest
Sorry, something went wrong.
There was an error while loading. Please reload this page.
[java] New Rule: MutableStaticState #3246
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[java] New Rule: Public and protected static fields must be final
There was an error while loading. Please reload this page.