Re: RFR: 8088998: XYChart: duplicate child added exception when remove & add a series in several charts [v2]

2023-02-09 Thread Karthik P K
On Thu, 9 Feb 2023 16:27:46 GMT, Andy Goryachev wrote: >> Updated code to set the handler in function annotated with @BeforeClass and >> cleaned up in @AfterClass. > > I am not sure setting uncaught exception handler in @BeforeClass and clearing > it in @AfterClass is correct. > The junit fram

Re: RFR: 8088998: XYChart: duplicate child added exception when remove & add a series in several charts [v2]

2023-02-09 Thread Andy Goryachev
On Thu, 9 Feb 2023 09:39:49 GMT, Karthik P K wrote: >> modules/javafx.controls/src/main/java/javafx/scene/chart/AreaChart.java line >> 562: >> >>> 560: if (timeline != null) { >>> 561: timeline.setOnFinished(null); >>> 562: timeline.stop(); >> >> two questions:

Re: RFR: 8088998: XYChart: duplicate child added exception when remove & add a series in several charts [v2]

2023-02-09 Thread Karthik P K
On Wed, 8 Feb 2023 19:07:51 GMT, Andy Goryachev wrote: > two questions: > > 1. should the timeline object be set to null here? the reference will > get overwritten in seriesRemoved():414, there is probably no need to keep > this object in memory > Yes timeline can be made null here. Upda

Re: RFR: 8088998: XYChart: duplicate child added exception when remove & add a series in several charts [v2]

2023-02-09 Thread Karthik P K
On Wed, 8 Feb 2023 17:31:08 GMT, Andy Goryachev wrote: >> Karthik P K has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Renamed system test file >> - Fixing issue in all XYCharts > > modules/javafx.controls/src/main/java/javafx/scene/ch

Re: RFR: 8088998: XYChart: duplicate child added exception when remove & add a series in several charts [v2]

2023-02-08 Thread Andy Goryachev
On Wed, 8 Feb 2023 07:42:14 GMT, Karthik P K wrote: >> While checking for duplicate series addition to the line chart, >> `setToRemove` value was not considered before throwing exception. Hence code >> to handling the case of adding the removed series was never run. >> >> Added condition to ch

Re: RFR: 8088998: XYChart: duplicate child added exception when remove & add a series in several charts [v2]

2023-02-08 Thread Karthik P K
On Wed, 8 Feb 2023 07:42:14 GMT, Karthik P K wrote: >> While checking for duplicate series addition to the line chart, >> `setToRemove` value was not considered before throwing exception. Hence code >> to handling the case of adding the removed series was never run. >> >> Added condition to ch

Re: RFR: 8088998: XYChart: duplicate child added exception when remove & add a series in several charts [v2]

2023-02-07 Thread Karthik P K
> While checking for duplicate series addition to the line chart, `setToRemove` > value was not considered before throwing exception. Hence code to handling > the case of adding the removed series was never run. > > Added condition to check `setToRemove` boolean value before throwing > exceptio