From f45f5c9ff9efb8dca9496c78a91f131ae75b9dc3 Mon Sep 17 00:00:00 2001 From: Mateusz Warowny Date: Wed, 15 Feb 2023 15:11:28 +0100 Subject: [PATCH] JAL-4130 Workaround the j2s issue with final variables inside lambdas --- src/jalview/ws2/gui/WebServicesMenuManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } }); } -- 1.7.10.2