< prev index next >
src/com/sun/javatest/exec/TT_BasicNode.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
*** 49,75 ****
this.comp = comp;
this.parent = parent;
this.tn = tn;
}
// ------- interface methods --------
! public Enumeration children() {
updateNode();
ArrayList<TT_TreeNode> copy = null;
synchronized (children) {
// shallow copy child list?
copy = new ArrayList<>(children);
}
! final Iterator it = copy.iterator();
! return new Enumeration() {
public boolean hasMoreElements() {
return it.hasNext();
}
! public Object nextElement() {
return it.next();
}
};
}
--- 49,75 ----
this.comp = comp;
this.parent = parent;
this.tn = tn;
}
// ------- interface methods --------
! public Enumeration<TT_TreeNode> children() {
updateNode();
ArrayList<TT_TreeNode> copy = null;
synchronized (children) {
// shallow copy child list?
copy = new ArrayList<>(children);
}
! final Iterator<TT_TreeNode> it = copy.iterator();
! return new Enumeration<TT_TreeNode>() {
public boolean hasMoreElements() {
return it.hasNext();
}
! public TT_TreeNode nextElement() {
return it.next();
}
};
}
< prev index next >