From 06badc45b1a1ba037faff88b7f842eb8f2311864 Mon Sep 17 00:00:00 2001 From: Matteo Bitussi Date: Wed, 6 Mar 2024 11:20:30 +0100 Subject: [PATCH] fix: just first message op was being executed --- tool/src/main/java/migt/Tools.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tool/src/main/java/migt/Tools.java b/tool/src/main/java/migt/Tools.java index 7da5657..cc88db5 100644 --- a/tool/src/main/java/migt/Tools.java +++ b/tool/src/main/java/migt/Tools.java @@ -67,9 +67,8 @@ public static Operation executeChecks(Operation op, List vars) throws Parsi */ public static Operation executeDecodeOps(Operation op, List vars) throws ParsingException { - Operation_API api = op.getAPI(); for (DecodeOperation dop : op.getDecodeOperations()) { - dop.loader(api); + dop.loader(op.getAPI()); dop.execute(vars); if (!op.setResult(dop)) break; @@ -88,9 +87,8 @@ public static Operation executeDecodeOps(Operation op, */ public static DecodeOperation executeDecodeOps(DecodeOperation op, List vars) throws ParsingException { - DecodeOperation_API api = op.getAPI(); for (DecodeOperation dop : op.decodeOperations) { - dop.loader(api); + dop.loader(op.getAPI()); dop.execute(vars); if (!op.setResult(dop)) break; @@ -109,9 +107,8 @@ public static DecodeOperation executeDecodeOps(DecodeOperation op, */ public static DecodeOperation executeEditOps(DecodeOperation op, List vars) throws ParsingException { - DecodeOperation_API api = op.getAPI(); for (EditOperation eop : op.editOperations) { - eop.loader(api); + eop.loader(op.getAPI()); eop.execute(vars); if (!op.setResult(eop)) break; @@ -129,9 +126,8 @@ public static DecodeOperation executeEditOps(DecodeOperation op, * @throws ParsingException if something goes wrong */ public static Operation executeEditOps(Operation op, List vars) throws ParsingException { - Operation_API api = op.getAPI(); for (EditOperation eop : op.editOperations) { - eop.loader(api); + eop.loader(op.getAPI()); eop.execute(vars); if (!op.setResult(eop)) break; @@ -146,7 +142,7 @@ public static Operation executeMessageOperations(Operation op) throws ParsingExc mop.loader(op.api); mop.execute(); op.setAPI(mop.exporter()); - if (op.setResult(op)) + if (!op.setResult(mop)) break; } return op;