Increasing the accessibility of overridden or hidden methods permits a malicious subclass to offer wider access to the restricted method than was originally intended. Consequently, programs must override methods only when necessary and must declare methods final whenever possible to prevent malicious subclassing. When methods cannot be declared final, programs should must refrain from increasing the accessibility of overridden methods. See rule SEC01-J for more information.)
Wiki Markup |
---|
The access modifier of an overriding or hiding method must provide at least as much access as the overridden or hidden method (_Java Language Specification_, §8.4.8.3, "Requirements in Overriding and Hiding"\] \[[JLS 2005|AA. Bibliography#JLS 05]. The following are the allowed accesses: |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="60ed18168899b9d7-d75ebda1-41694e8a-a1af91a2-751a10c83ef1313544073e15"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | [§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> |
...