...
MET04-EX0: For classes that implement the java.lang.Cloneable
interface, the accessibility of the Object.clone()
method should be increased from protected to public [SCG 20072009].
Risk Assessment
Subclassing allows weakening of access restrictions, which can compromise the security of a Java application.
...
CWE-487 "Reliance on Package-level Scope" | |
Guideline 1-1 Limit the accessibility of classes, interfaces, methods, and fields |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ad2267ba7e628930-94a90f3d-45384f2a-b0119e6a-0d1034d6160fd8e24cf46155"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | [Section 8.4.8.3 | http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.4.8.3], "Requirements in Overriding and Hiding" | ]]></ac:plain-text-body></ac:structured-macro> |
...