Versions Compared

Key

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

...

Code Block
bgColor#ccccff
final class Point {
  private static final int x = 1;
  private static final int y = 2;

  private Point(int x, int y) {}
    
  public static void getPoint() { 
    System.out.println("(" + x + "," + y + ")");  
  } 
}

Exceptions

OBJ15OBJ02-EX0: A system with an API designed to be used (and possibly extended) by third-party code, must have classes and methods sufficiently public to provide that API. The demands of such an API override this rule.

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

OBJ15 OBJ02-J

medium

likely

medium

P12

L1

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="84255cf36b4867db-e494f2d3-49744747-8486b332-a0b69db9db55ee609de0118a"><ac:plain-text-body><![CDATA[

[[Bloch 2008

AA. Bibliography#Bloch 08]]

Item 13: Minimize the accessibility of classes and members; Item 16: Prefer interfaces to abstract classes

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f879c87be9cecc8a-a2aaae49-46864d6a-95ef80b0-3d8aec3be243fc702aea70c1"><ac:plain-text-body><![CDATA[

[[Campione 1996

AA. Bibliography#Campione 96]]

[Access Control

http://www.telecom.ntua.gr/HTML.Tutorials/java/javaOO/accesscontrol.html]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c9c4a3c09bf05a43-0057b052-483442a1-baa59408-19a8c28f00c9125692103d8f"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

[Section 6.6, Access Control

http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6]

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7949d51d73f32e3d-1f47d233-4d7c41ec-9b77b421-ff49ebeec4d59d306120967f"><ac:plain-text-body><![CDATA[

[[McGraw 1999

AA. Bibliography#McGraw 99]]

Chapter 3, Java Language Security Constructs

]]></ac:plain-text-body></ac:structured-macro>

...