On Thu, 20 Jun 2024 17:50:20 GMT, Markus Mack <mm...@openjdk.org> wrote:
>> I've added a popup menu on the BarChart page in the Monkey Tester to test >> the case ... >> https://github.com/andy-goryachev-oracle/MonkeyTest > > You'll need to add an additional point after adding the one with duplicate > categories to see the exception in the console. Using the "Add Point" button > in the monkey tester after using the context menu entry should reproduce the > issue. > Regarding category hashtables, do you have any specific issues in mind, or > see any regressions due to this PR? Otherwise I'd suggest to create separate > issues / failing tests and do follow-up PRs. No, repeated invocation of the menu does not produce an exception. Maybe I am doing something wrong: void addDuplicateCategory() { var d = chart.getData(); if (d.size() > 0) { var dd = d.get(0).getData(); if (dd.size() > 0) { var v = dd.get(0); dd.add(new XYChart.Data(v.getXValue(), v.getYValue().doubleValue() + 1.0)); } } } As for the hashtables, I was just surprised to see the issue not reproducible with the menu. It is a different scenario, and I am trying to understand why the difference. The reason for my comment is that the code that checks for the sizes looks suspicious on the grounds that, when things are accounted for correctly, it should be unnecessary. The current fix does look a bit artificial. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1476#discussion_r1647950248