You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accidental method access widening is a big problem. Often the consequence
is that the API is cluttered with additional (and unnecessary) public
methods, but in some cases widening could lead to unexpected
interactions. JCompoent.paintComponent method is frequently overridden
and widened to no useful effect. Such an annotation would provide the
user with a clear warning that he has done something unexpected.
Conversely, there is the case where we expect that the access is widened
(to public). The ever-problematic Object.clone is such a method. Users
should be warned if they override Object.clone, but do not widen access to
the method.
I am proposing the addition of two annotations:
AccessWideningProhibited
AccessWideningRequired
Theorectically, we could also include the middle ground, but that seems
overwrought to me:
AccessWideningPermitted
Thanks,
Karl Schaefer
Original issue reported on code.google.com by [email protected] on 4 Feb 2009 at 2:27
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 4 Feb 2009 at 2:27The text was updated successfully, but these errors were encountered: