JAL-4130 Workaround the j2s issue with final variables inside lambdas
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Wed, 15 Feb 2023 14:11:28 +0000 (15:11 +0100)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Thu, 16 Feb 2023 15:23:58 +0000 (16:23 +0100)
src/jalview/ws2/gui/WebServicesMenuManager.java

index 2c405ff..8a799c5 100644 (file)
@@ -158,9 +158,8 @@ public class WebServicesMenuManager
         // sort actions by name pulling nulls to the front
         v.sort(Comparator.comparing(
             ActionI::getName, Comparator.nullsFirst(Comparator.naturalOrder())));
-        for (ActionI<?> action : v)
-        {
-          addEntriesForAction(action, atMenu, atMenu == menu);
+        for (int i = 0; i < v.size(); i++) {
+          addEntriesForAction(v.get(i), atMenu, atMenu == menu);
         }
       });
     }