Convert operators to lowercase in the constructors that have them,

instead of only during parsing; this fixes instances where the objects
are not constructed by the sql parser.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@949605 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adam Heath
2010-05-30 22:06:42 +00:00
parent 4a31886e82
commit 69de194305
4 changed files with 6 additions and 6 deletions
@@ -25,7 +25,7 @@ public final class BooleanCondition extends Condition {
public BooleanCondition(Value left, String op, Value right) {
this.left = left;
this.op = op;
this.op = op.toLowerCase();
this.right = right;
}
@@ -29,7 +29,7 @@ public final class ListCondition extends Condition {
public ListCondition(Value left, String op, List<Value> values) {
this.left = left;
this.op = op;
this.op = op.toLowerCase();
this.values = values;
}
@@ -28,7 +28,7 @@ public final class MathValue extends StaticValue implements Iterable<ConstantVal
private final List<ConstantValue> values;
public MathValue(String op, List<ConstantValue> values) {
this.op = op;
this.op = op.toLowerCase();
this.values = values;
}
+3 -3
View File
@@ -844,7 +844,7 @@ private String ComparisonOperator():
(s=Text() { sb.append(s); })?
)* { return sb.toString(); }
| <NAME> { return getToken(0).image; }
| <EQUALS> { return getToken(0).image.toLowerCase(); }
| <EQUALS> { return getToken(0).image; }
}
private String MathOperator():
@@ -852,6 +852,6 @@ private String MathOperator():
String s;
}
{
s=Text() { return s.toLowerCase(); }
| <NAME> { return getToken(0).image.toLowerCase(); }
s=Text() { return s; }
| <NAME> { return getToken(0).image; }
}