Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As a cautionary note, however, simply changing the modifier to final may not prevent attackers from indirectly retrieving an incorrect value from the static final variable before its initialization. See MSC00-J. Eliminate class initialization cycles and OBJ03-J. Be careful about aware that a final reference may not always refer to immutable data for more details about these such problems.

Risk Assessment

Unauthorized modifications of public static variables can result in unexpected behavior and violation of class invariants.

...