CharlesSkelton / studio

Studio for kdb+ / Rapid execution environment for q
Apache License 2.0
94 stars 61 forks source link

Fix for java 11 #20

Closed punx120 closed 4 years ago

punx120 commented 4 years ago

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

dzmipt commented 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();
    }
punx120 commented 4 years ago

@dzmipt yes that works - see #21