Closed punx120 closed 4 years ago
The idea for childNodes() method was to avoid casting everywhere.
I don't have Java 11 at the moment (will try/check it later). However it looks they changed Vector
to Vector<TreeNode>
. In such case, will such implementation work in Java 11 ?
public Iterable<ServerTreeNode> childNodes() {
if (children != null) return (Vector) children; // implicit casting to Vector
return Collections.emptyList();
}
@dzmipt yes that works - see #21
In Java 11 (maybe 9), DefaultMutableTreeNode.children changes from Vector to Vector making #16 not compiling under java 11. Adding a few cast - could not think of a nicer/better solution