From eba1114b39735cd5548d68af1daae51807d78d81 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Sat, 21 Sep 2013 19:06:47 +0200 Subject: [PATCH] IntelliJ demanded attention. --- src/main/java/com/sk89q/worldedit/expression/runtime/For.java | 1 + .../com/sk89q/worldedit/expression/runtime/SimpleFor.java | 1 + .../java/com/sk89q/worldedit/expression/runtime/Switch.java | 4 +--- .../java/com/sk89q/worldedit/expression/runtime/While.java | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/For.java b/src/main/java/com/sk89q/worldedit/expression/runtime/For.java index 950e9ebd2..4164fd3a3 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/For.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/For.java @@ -57,6 +57,7 @@ public class For extends Node { ret = body.getValue(); } catch (BreakException e) { if (e.doContinue) { + //noinspection UnnecessaryContinue continue; } else { break; diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/SimpleFor.java b/src/main/java/com/sk89q/worldedit/expression/runtime/SimpleFor.java index 1b04fc919..801e9709d 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/SimpleFor.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/SimpleFor.java @@ -61,6 +61,7 @@ public class SimpleFor extends Node { ret = body.getValue(); } catch (BreakException e) { if (e.doContinue) { + //noinspection UnnecessaryContinue continue; } else { break; diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/Switch.java b/src/main/java/com/sk89q/worldedit/expression/runtime/Switch.java index 7520381f3..cdf259038 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/Switch.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/Switch.java @@ -157,9 +157,7 @@ public class Switch extends Node implements RValue { final RValue invokable = defaultCase.optimize(); if (invokable instanceof Sequence) { - for (RValue subInvokable : ((Sequence) invokable).sequence) { - newSequence.add(subInvokable); - } + Collections.addAll(newSequence, ((Sequence) invokable).sequence); } else { newSequence.add(invokable); } diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/While.java b/src/main/java/com/sk89q/worldedit/expression/runtime/While.java index cee82f30f..f68dcb660 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/While.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/While.java @@ -73,6 +73,7 @@ public class While extends Node { ret = body.getValue(); } catch (BreakException e) { if (e.doContinue) { + //noinspection UnnecessaryContinue continue; } else { break;