javafx - OpenJFX 9-dev XYChart.java...is this a bug? -


i have been browsing through source code relating javafx charts lately, , came across following method:

/**  * should called seriesremoved() when finished animation deleting series  * chart. remove series showing in iterator returned getdisplayedseriesiterator().  *  * @param series series remove  */ protected final void removeseriesfromdisplay(series<x, y> series) {     if (series != null) series.settoremove = false;     series.setchart(null);     displayedseries.remove(series); } 

here: http://hg.openjdk.java.net/openjfx/9-dev/rt/file/9c2e8ff4fa26/modules/controls/src/main/java/javafx/scene/chart/xychart.java#l910

if series passed in null, there nothing keep making call series.setchart(null); will, if series null, cause nullpointerexception. given method protected , therefore visible sub-classes, shouldn't if statement contain brackets surround entire method? essentially:

/**  * should called seriesremoved() when finished animation deleting series  * chart. remove series showing in iterator returned getdisplayedseriesiterator().  *  * @param series series remove  */ protected final void removeseriesfromdisplay(series<x, y> series) {     if (series != null) {         series.settoremove = false;         series.setchart(null);     }     displayedseries.remove(series); } 

given openjfx authors better programmers am, hesitant report bug, given not setup (via jira system or mailing lists, wanted ask more knowledgeable folks me before proceed embarrass myself!)


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -