Skip to content

Commit

Permalink
fix: just first message op was being executed
Browse files Browse the repository at this point in the history
  • Loading branch information
mattebit committed Mar 6, 2024
1 parent 795b26f commit 06badc4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tool/src/main/java/migt/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ public static Operation executeChecks(Operation op, List<Var> vars) throws Parsi
*/
public static Operation executeDecodeOps(Operation op,
List<Var> 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;
Expand All @@ -88,9 +87,8 @@ public static Operation executeDecodeOps(Operation op,
*/
public static DecodeOperation executeDecodeOps(DecodeOperation op,
List<Var> 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;
Expand All @@ -109,9 +107,8 @@ public static DecodeOperation executeDecodeOps(DecodeOperation op,
*/
public static DecodeOperation executeEditOps(DecodeOperation op,
List<Var> 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;
Expand All @@ -129,9 +126,8 @@ public static DecodeOperation executeEditOps(DecodeOperation op,
* @throws ParsingException if something goes wrong
*/
public static Operation executeEditOps(Operation op, List<Var> 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;
Expand All @@ -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;
Expand Down

0 comments on commit 06badc4

Please sign in to comment.