commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen...@apache.org
Subject svn commit: r1165649 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Interpreter.java
Date Tue, 06 Sep 2011 12:58:18 GMT
Author: henrib
Date: Tue Sep  6 12:58:17 2011
New Revision: 1165649

URL: http://svn.apache.org/viewvc?rev=1165649&view=rev
Log:
Fixed a bug in operator 'in/match' where 'contains' method was not detected correctly

Modified:
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Interpreter.java

Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Interpreter.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Interpreter.java?rev=1165649&r1=1165648&r2=1165649&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Interpreter.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Interpreter.java Tue
Sep  6 12:58:17 2011
@@ -1171,14 +1171,14 @@ public class Interpreter implements Pars
             }
             // try a contains method (duck type set)
             try {
-                Object[] argv = {right};
-                JexlMethod vm = uberspect.getMethod(left, "contains", argv, node);
+                Object[] argv = {left};
+                JexlMethod vm = uberspect.getMethod(right, "contains", argv, node);
                 if (vm != null) {
-                    return arithmetic.toBoolean(vm.invoke(left, argv)) ? Boolean.FALSE :
Boolean.TRUE;
+                    return arithmetic.toBoolean(vm.invoke(right, argv)) ? Boolean.FALSE :
Boolean.TRUE;
                 } else if (arithmetic.narrowArguments(argv)) {
-                    vm = uberspect.getMethod(left, "contains", argv, node);
+                    vm = uberspect.getMethod(right, "contains", argv, node);
                     if (vm != null) {
-                        return arithmetic.toBoolean(vm.invoke(left, argv)) ? Boolean.FALSE
: Boolean.TRUE;
+                        return arithmetic.toBoolean(vm.invoke(right, argv)) ? Boolean.FALSE
: Boolean.TRUE;
                     }
                 }
             } catch (InvocationTargetException e) {



Mime
View raw message