Compilation error with b78 not with 77

Sven Reimers sven.reimers at gmail.com
Thu Feb 28 05:40:28 PST 2013


The following code worked fine with b77


private void testMethod() {
        XYChart<Number, Number> numberChart = new LineChart<>(new NumberAxis(),
new NumberAxis());
        List<XYChart.Data<Number, Number>> data_1 = new ArrayList<>();
        List<XYChart.Data<Number, Number>> data_2 = new ArrayList<>();
        numberChart.getData().setAll(Arrays.asList(
                        new XYChart.Series<>("Data",
FXCollections.observableList(data_1)),
                        new XYChart.Series<>("Data",
FXCollections.observableList(data_2))));
    }

Compiling with b78 gives me

 error: cannot infer type arguments for Series<>

for the conversion with FXCollections.observableList.

Any ideas if this intentional? Should I report a bug with openjdk?

Thanks

Sven

-- 
Sven Reimers

* Senior Expert Software Architect
* NetBeans Dream Team Member: http://dreamteam.netbeans.org
* Community Leader  NetBeans: http://community.java.net/netbeans
                              Desktop Java:
http://community.java.net/javadesktop
* Duke's Choice Award Winner 2009
* Blog: http://nbguru.blogspot.com

* XING: https://www.xing.com/profile/Sven_Reimers8
* LinkedIn: http://www.linkedin.com/in/svenreimers

Join the NetBeans Groups:
* XING: http://www.xing.com/group-20148.82db20
* NUGM: http://haug-server.dyndns.org/display/NUGM/Home
* LinkedIn: http://www.linkedin.com/groups?gid=1860468
                   http://www.linkedin.com/groups?gid=107402
                   http://www.linkedin.com/groups?gid=1684717
* Oracle: https://mix.oracle.com/groups/18497


More information about the openjfx-dev mailing list