From: Mateusz Warowny Date: Wed, 15 Feb 2023 14:11:28 +0000 (+0100) Subject: JAL-4130 Workaround the j2s issue with final variables inside lambdas X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f45f5c9ff9efb8dca9496c78a91f131ae75b9dc3;p=jalview.git JAL-4130 Workaround the j2s issue with final variables inside lambdas --- diff --git a/src/jalview/ws2/gui/WebServicesMenuManager.java b/src/jalview/ws2/gui/WebServicesMenuManager.java index 2c405ff..8a799c5 100644 --- a/src/jalview/ws2/gui/WebServicesMenuManager.java +++ b/src/jalview/ws2/gui/WebServicesMenuManager.java @@ -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); } }); }