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
Recognize OpenDaylight's Immutable interface contract #1703
base: master
Are you sure you want to change the base?
Conversation
66ad703
to
5b67eea
Compare
This will be reworked on top of #1704 |
1a32099
to
fbf488b
Compare
This builds on top of #1705 |
fbf488b
to
87d2d2c
Compare
87d2d2c
to
2cf5b6f
Compare
OpenDaylight has a type-safe marker interface which acts as API contract specification of effective immutability. Recognize this contract as equivalent to an inherited @immutable annotation. Fixes spotbugs#1697. Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2cf5b6f
to
ca26261
Compare
Please avoid force-pushing; it wrecks the history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The marker interface has no meaning in the bytecode level; annotated classes still be able to be mutable. Then I suggest not to merge this change but enhance the mutability check algorithm to reduce false positive and false negative.
Ack |
That depends on what the expectations on MutableClasses are from three perspectives:
At the end of the day, we are trusting |
Aside from recognizing annotations, also treat any class that implements
an interface named Immutable as an immutable class. Fixes #1697.
Signed-off-by: Robert Varga robert.varga@pantheon.tech
Make sure these boxes are checked before submitting your PR -- thank you!
CHANGELOG.md
if you have changed SpotBugs code