aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/trygvis/esper/testing/Util.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/trygvis/esper/testing/Util.java')
-rwxr-xr-xsrc/main/java/io/trygvis/esper/testing/Util.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/Util.java b/src/main/java/io/trygvis/esper/testing/Util.java
index 6b9d1b6..68660c4 100755
--- a/src/main/java/io/trygvis/esper/testing/Util.java
+++ b/src/main/java/io/trygvis/esper/testing/Util.java
@@ -89,16 +89,20 @@ public class Util {
}
for (String s : allowed) {
- if (s.equals(input)) {
- if (buffer.length() == 0) {
- buffer.append(" ORDER BY ");
- } else {
- buffer.append(", ");
- }
- buffer.append(s);
- if (desc) {
- buffer.append(" DESC");
- }
+ if (!s.equals(input)) {
+ continue;
+ }
+
+ if (buffer.length() == 0) {
+ buffer.append(" ORDER BY ");
+ } else {
+ buffer.append(", ");
+ }
+
+ buffer.append(s);
+
+ if (desc) {
+ buffer.append(" DESC");
}
}
}