If we were invoking these methods without an instance (e.g.
nodesInserted() vs. foo.nodesInserted()), I think this would be an
issue. However, we qualify the object on which the method should be
invoked everywhere we call it.
G
On Aug 4, 2009, at 5:40 AM, Sandro Martini wrote:
Hi,
this is the last High priority thing on Pivot :-) (the remaining one
is still an open ticket in jira, related to Maps containing URLs, but
needs some API changes and so needs further exploration)
- Ambiguous invocation of either an outer or inherited method
org.apache.pivot.util.ListenerList.iterator()
on
for (ElementListener listener : this) {
for both
public void nodeInserted(Element element, int index) {
and
public void nodesRemoved(Element element, int index,
This is the error description/hint:
An inner class is invoking a method that could be resolved to either a
inherited method or a method defined in an outer class. By the Java
semantics, it will be resolved to invoke the inherited method, but
this may not be want you intend. If you really intend to invoke the
inherited method, invoke it by invoking the method on super (e.g.,
invoke super.foo(17)), and thus it will be clear to other readers of
your code and to FindBugs that you want to invoke the inherited
method, not the method in the outer class.
What do you think ?