On Sat, 14 Mar 2026 13:24:04 GMT, Kevin Rushforth <[email protected]> wrote:

> I passed this on to the person responsible for verifying your OCA status. It 
> shouldn't take too long.

Awesome!



> It does sound like a very similar problem.

It is related to calling `clearSelection(int)` in a loop in 
`CellBehaviorBase.java`, but these changes alone don't fix it. The solution is 
pretty simple and passes all tests. Should I add that to this PR?


-        // To prevent JDK-8123898, we make a copy of the selected indices
-        // list first, so that we are not iterating and modifying it
-        // concurrently.
-        List<Integer> selectedIndices = new 
ArrayList<>(getSelectionModel().getSelectedIndices());
-        for (int i = 0, max = selectedIndices.size(); i < max; i++) {
-            int selectedIndex = selectedIndices.get(i);
-            if (selectedIndex < minRow || selectedIndex > maxRow) {
-                getSelectionModel().clearSelection(selectedIndex);
-            }
-        }
+        getSelectionModel().clearSelection();


[StringPlayground3.java](https://github.com/user-attachments/files/26000980/StringPlayground3.java)

Mainline:

Starting Benchmark with 5500 elements!
Robot finished in: 85ms
UI Unfroze after: 33108ms
Total Operation: 33193ms

With change:

Starting Benchmark with 5500 elements!
Robot finished in: 87ms
UI Unfroze after: 1ms
Total Operation: 88ms

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2100#issuecomment-4061111820

Reply via email to