commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r814633 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/util/ListGetExecutor.java
Date Mon, 14 Sep 2009 14:37:27 GMT
On 14/09/2009, henrib@apache.org <henrib@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


Mime
View raw message