On 11/08/2009, Rahul Akolkar <rahul.akol...@gmail.com> wrote: > On Tue, Aug 11, 2009 at 7:40 AM, <s...@apache.org> wrote: > > Author: sebb > > Date: Tue Aug 11 11:40:08 2009 > > New Revision: 803067 > > > > URL: http://svn.apache.org/viewvc?rev=803067&view=rev > > Log: > > Boxing/unboxing > > > > Modified: > > > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/ArrayLiteralTest.java > > > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/ArrayTest.java > > > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/MethodPropertyTest.java > > > <snip/> > > Don't need to do this for test classes (whats been done is fine) -- > tests are easier to read with the autoboxing IMO.
Since the tests are comparing Objects, I thought it was clearer to make the boxed type clearer. > -Rahul > > > > Modified: > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/ArrayLiteralTest.java > > URL: > http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/ArrayLiteralTest.java?rev=803067&r1=803066&r2=803067&view=diff > > > ============================================================================== > > --- > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/ArrayLiteralTest.java > (original) > > +++ > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/ArrayLiteralTest.java > Tue Aug 11 11:40:08 2009 > > @@ -47,7 +47,7 @@ > > JexlContext jc = JexlHelper.createContext(); > > > > Object o = e.evaluate( jc ); > > - Object[] check = { 5, 10 }; > > + Object[] check = { Integer.valueOf(5), Integer.valueOf(10) }; > > assertTrue( Arrays.equals(check, (Object[])o) ); > > } > > > > > > Modified: > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/ArrayTest.java > > URL: > http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/ArrayTest.java?rev=803067&r1=803066&r2=803067&view=diff > > > ============================================================================== > > --- > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/ArrayTest.java > (original) > > +++ > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/ArrayTest.java > Tue Aug 11 11:40:08 2009 > > @@ -57,7 +57,7 @@ > > e = jexl.createExpression("array[0].length()"); > > o = e.evaluate(jc); > > > > - out.print("The length of the string at location 0 is : ", o, 21); > > + out.print("The length of the string at location 0 is : ", o, > Integer.valueOf(21)); > > } > > > > /** > > > > Modified: > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/MethodPropertyTest.java > > URL: > http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/MethodPropertyTest.java?rev=803067&r1=803066&r2=803067&view=diff > > > ============================================================================== > > --- > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/MethodPropertyTest.java > (original) > > +++ > commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/examples/MethodPropertyTest.java > Tue Aug 11 11:40:08 2009 > > @@ -71,7 +71,7 @@ > > > > e = jexl.createExpression("foo.convert(1+number)"); > > o = e.evaluate(jc); > > - out.print("value of " + e.getExpression() + " is : ", o, > foo.convert(1+number)); > > + out.print("value of " + e.getExpression() + " is : ", o, > foo.convert(1+number.intValue())); > > > > /* > > * access a property > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org