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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user