Author: doogie
Date: Sun May 30 22:06:42 2010 New Revision: 949605 URL: http://svn.apache.org/viewvc?rev=949605&view=rev Log: 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. Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BooleanCondition.java ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ListCondition.java ofbiz/trunk/framework/sql/src/org/ofbiz/sql/MathValue.java ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BooleanCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BooleanCondition.java?rev=949605&r1=949604&r2=949605&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BooleanCondition.java (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/BooleanCondition.java Sun May 30 22:06:42 2010 @@ -25,7 +25,7 @@ public final class BooleanCondition exte public BooleanCondition(Value left, String op, Value right) { this.left = left; - this.op = op; + this.op = op.toLowerCase(); this.right = right; } Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ListCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ListCondition.java?rev=949605&r1=949604&r2=949605&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ListCondition.java (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/ListCondition.java Sun May 30 22:06:42 2010 @@ -29,7 +29,7 @@ public final class ListCondition extends public ListCondition(Value left, String op, List<Value> values) { this.left = left; - this.op = op; + this.op = op.toLowerCase(); this.values = values; } Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/MathValue.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/MathValue.java?rev=949605&r1=949604&r2=949605&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/MathValue.java (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/MathValue.java Sun May 30 22:06:42 2010 @@ -28,7 +28,7 @@ public final class MathValue extends Sta private final List<ConstantValue> values; public MathValue(String op, List<ConstantValue> values) { - this.op = op; + this.op = op.toLowerCase(); this.values = values; } Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj?rev=949605&r1=949604&r2=949605&view=diff ============================================================================== --- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj (original) +++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/Parser.jj Sun May 30 22:06:42 2010 @@ -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; } } |
Free forum by Nabble | Edit this page |