I've used Arrays.asList dozens if not hundreds of times without problem. All of a sudden previously compiling code is failing to compile after switching to NetBeans 6.9 from 6.8. Here's a few lines in question:
Node n = new NickNode(4,5);
Node m = new NonLocatableNode();
Node subclass = new NickSubclassNode();
List<Node> nodes = Arrays.asList(n,m,subclass);
The subclasses of node are not important; they compile fine. The line that gives me an error is the Arrays.asList line. I get the error
I have no idea where it's getting anything about a HelpCtx.Provider[]... Does anyone see anything wrong with this snippet?
Replacing the asList line with
List<Node> theNodes = new LinkedList<Node>();
theNodes.add(n);
theNodes.add(m);
theNodes.add(subclass);
works fine. But I prefer the shorter syntax of Arrays.asList