Add a pmd rule to look for any static fields that are marked as static but not 
final, or static final but have values that can be modified (like a HashMap). 
This will allow us to eventually eliminate and enforce not having mutable 
static fields.

Adding a few annotations to categorize our static fields:

- Immutable - mark classes or fields that are really immutable as immutable. 
The pmd rule can ignore these.
- MakeImmutable - Temporary annotation to mark fields that aren't immutable but 
should be. For example a static final HashMap that we never change.
- MakeNonStatic - Temporary annotation mark fields that are static that we are 
allowing to be modified at runtime. These fields should be turned into instance 
fields or cache.
- MutableForTests - Temporary annotation to mark fields that should be 
immutable, but are not to allow setting them in tests. These also should 
eventually be turned into instance fields.

Annotating fields within geode-core with these annotations.


[ Full content available at: https://github.com/apache/geode/pull/3178 ]
This message was relayed via gitbox.apache.org for 
[email protected]

Reply via email to