You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by he...@apache.org on 2009/09/14 15:25:05 UTC

svn commit: r814633 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java

Author: henrib
Date: Mon Sep 14 13:25:05 2009
New Revision: 814633

URL: http://svn.apache.org/viewvc?rev=814633&view=rev
Log:
fix tryExecute which was not using the index argument

Modified:
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java

Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java?rev=814633&r1=814632&r2=814633&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java Mon Sep 14 13:25:05 2009
@@ -63,9 +63,9 @@
             && objectClass.equals(list.getClass())
             && index instanceof Integer) {
             if (method == ARRAY_GET) {
-                return java.lang.reflect.Array.get(list, property.intValue());
+                return java.lang.reflect.Array.get(list, (Integer) index);
             } else {
-                return ((List<?>) list).get(property.intValue());
+                return ((List<?>) list).get((Integer) index);
             }
         }
         return TRY_FAILED;



Re: svn commit: r814633 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java

Posted by sebb <se...@gmail.com>.
On 14/09/2009, Henrib <hb...@gmail.com> wrote:
>
>
>
>  sebb-2-2 wrote:
>  >
>  > Is there a test case which exposes the old (bad) behaviour?
>  >
>
>
> I stumbled on the problem whilst fixing JELLY / JEXL integration.
>  I'll add test cases for tryInvoke on all Getters/Setters momentarily.

OK, thanks.

>
>  --
>  View this message in context: http://www.nabble.com/svn-commit%3A-r814633----commons-proper-jexl-trunk-src-main-java-org-apache-commons-jexl-util-ListGetExecutor.java-tp25435761p25437236.html
>  Sent from the Commons - Dev mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r814633 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java

Posted by Henrib <hb...@gmail.com>.


sebb-2-2 wrote:
> 
> Is there a test case which exposes the old (bad) behaviour?
> 

I stumbled on the problem whilst fixing JELLY / JEXL integration.
I'll add test cases for tryInvoke on all Getters/Setters momentarily.

-- 
View this message in context: http://www.nabble.com/svn-commit%3A-r814633----commons-proper-jexl-trunk-src-main-java-org-apache-commons-jexl-util-ListGetExecutor.java-tp25435761p25437236.html
Sent from the Commons - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r814633 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java

Posted by sebb <se...@gmail.com>.
On 14/09/2009, henrib@apache.org <he...@apache.org> wrote:
> Author: henrib
>  Date: Mon Sep 14 13:25:05 2009
>  New Revision: 814633
>
>  URL: http://svn.apache.org/viewvc?rev=814633&view=rev
>  Log:
>  fix tryExecute which was not using the index argument

Is there a test case which exposes the old (bad) behaviour?

>  Modified:
>     commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java
>
>  Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java
>  URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java?rev=814633&r1=814632&r2=814633&view=diff
>  ==============================================================================
>  --- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java (original)
>  +++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java Mon Sep 14 13:25:05 2009
>  @@ -63,9 +63,9 @@
>              && objectClass.equals(list.getClass())
>              && index instanceof Integer) {
>              if (method == ARRAY_GET) {
>  -                return java.lang.reflect.Array.get(list, property.intValue());
>  +                return java.lang.reflect.Array.get(list, (Integer) index);
>              } else {
>  -                return ((List<?>) list).get(property.intValue());
>  +                return ((List<?>) list).get((Integer) index);
>              }
>          }
>          return TRY_FAILED;
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org