Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider Java v3.0

...

Code Block
bgColor#ccccff
private static final SomeType [] THE_THINGS = { ... };
public static final List<SomeType>List&lt;SomeType&gt; SOMETHINGS =
  Collections.unmodifiableList(Arrays.asList(THE_THINGS));

...

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

References

Wiki Markup
\[[JLS 06|AA. Java References#JLS 06]\] Section 6.6, Access Control
\[[Bloch 08|AA. Java References#Bloch 08]\] Item 13: Minimize the accessibility of classes and members

...

SEC36-J. Ensure that the bytecode verifier is applied to all involved code upon any modification      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;02. Platform Security (SEC)      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;03. Declarations and Initialization (DCL)