From: ###@###.###
Date: Thu, 24 Mar 2005 19:21:27 +0100
public class AttributeList extends ArrayList {
public AttributeList(AttributeList al) {...}
public AttributeList(List<Attribute> l) {...}
}
For some surprising compatibility reasons, AttributeList can't extend
ArrayList<Attribute>, even though that is what it really is. It just
extends raw ArrayList.
What we're seeing is that the following code:
AttributeList al =
new AttributeList(new AttributeList());
gives the following error:
AL.java:6: reference to AttributeList is ambiguous, both method
AttributeList(javax.management.AttributeList) in
javax.management.AttributeList and method
AttributeList(java.util.List<javax.management.Attribute>) in
javax.management.AttributeList match
AttributeList al = new AttributeList(new AttributeList());
^
###@###.### 2005-03-24 20:00:46 GMT