You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mc...@apache.org on 2011/11/03 10:18:01 UTC
svn commit: r1197009 -
/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTChain.java
Author: mcucchiara
Date: Thu Nov 3 09:18:01 2011
New Revision: 1197009
URL: http://svn.apache.org/viewvc?rev=1197009&view=rev
Log:
OGNL-37 - Remove int boxing, lets rely on autoboxing.
Modified:
commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTChain.java
Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTChain.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTChain.java?rev=1197009&r1=1197008&r2=1197009&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTChain.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ASTChain.java Thu Nov 3 09:18:01 2011
@@ -109,15 +109,16 @@ public class ASTChain
i++;
break;
case DynamicSubscript.FIRST:
- index = new Integer( ( len > 0 ) ? 0 : -1 );
+ index = ( len > 0 ) ? 0 : -1;
break;
case DynamicSubscript.MID:
- index = new Integer( ( len > 0 ) ? ( len / 2 ) : -1 );
+ index = ( len > 0 ) ? ( len / 2 ) : -1;
break;
case DynamicSubscript.LAST:
- index = new Integer( ( len > 0 ) ? ( len - 1 ) : -1 );
+ index = ( len > 0 ) ? ( len - 1 ) : -1;
+ break;
+ default:
break;
- default: break;
}
}
else
@@ -190,15 +191,16 @@ public class ASTChain
i++;
break;
case DynamicSubscript.FIRST:
- index = new Integer( ( len > 0 ) ? 0 : -1 );
+ index = ( len > 0 ) ? 0 : -1;
break;
case DynamicSubscript.MID:
- index = new Integer( ( len > 0 ) ? ( len / 2 ) : -1 );
+ index = ( len > 0 ) ? ( len / 2 ) : -1;
break;
case DynamicSubscript.LAST:
- index = new Integer( ( len > 0 ) ? ( len - 1 ) : -1 );
+ index = ( len > 0 ) ? ( len - 1 ) : -1;
+ break;
+ default:
break;
- default: break;
}
}
else