Increasing the accessibility of overridden or hidden methods permits a malicious subclass to offer wider access to the restricted method than was originally intended.
Wiki Markup |
---|
According to the Java Language Specification \[[JLS 2005|AA. Bibliography#JLS 05]\], Section 8.4.8.3, "Requirements in Overriding and Hiding" |
...
Overridden/hidden method modifier | Overriding/hiding method modifier |
---|---|
|
|
|
|
default | default or |
| Cannot be overridden |
...
Noncompliant Code Example
...