commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1103095 [22/24] - in /incubator/ognl/trunk/src: main/java/org/apache/commons/ognl/ main/java/org/apache/commons/ognl/enhance/ main/java/org/apache/commons/ognl/internal/ test/java/org/apache/commons/ognl/ test/java/org/apache/commons/ognl/...
Date Sat, 14 May 2011 13:18:36 GMT
Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyTest.java Sat May 14 13:18:29 2011
@@ -29,138 +29,156 @@ import org.apache.commons.ognl.test.obje
 import java.text.SimpleDateFormat;
 import java.util.Arrays;
 
-public class PropertyTest extends OgnlTestCase
+public class PropertyTest
+    extends OgnlTestCase
 {
 
-    public static final SimpleDateFormat DATETIME_FORMAT = new SimpleDateFormat("MM/dd/yyyy hh:mm a 'CST'");
-    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy");
+    public static final SimpleDateFormat DATETIME_FORMAT = new SimpleDateFormat( "MM/dd/yyyy hh:mm a 'CST'" );
+
+    public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat( "MM/dd/yyyy" );
+
     public static final String VALUE = "foo";
-    
+
     private static Root ROOT = new Root();
+
     private static BaseBean BEAN = new FirstBean();
+
     private static PropertyHolder PROPERTY = new PropertyHolder();
 
-    private static Object[][]       TESTS = {
-            { ROOT, "testString != null && !false", Boolean.TRUE},
+    private static Object[][] TESTS =
+        {
+            { ROOT, "testString != null && !false", Boolean.TRUE },
             { ROOT, "!getRenderNavigation() and !getReadonly()", Boolean.TRUE },
-            { ROOT, "!bean2.pageBreakAfter", Boolean.TRUE},
+            { ROOT, "!bean2.pageBreakAfter", Boolean.TRUE },
             { ROOT, "map", ROOT.getMap() },
             { ROOT, "map.test", ROOT },
             { ROOT, "map[\"test\"]", ROOT },
             { ROOT, "map[\"te\" + \"st\"]", ROOT },
-            { ROOT, "map[(\"s\" + \"i\") + \"ze\"]", ROOT.getMap().get(Root.SIZE_STRING) },
-            { ROOT, "map[\"size\"]", ROOT.getMap().get(Root.SIZE_STRING) },
-            { ROOT, "map[@org.apache.commons.ognl.test.objects.Root@SIZE_STRING]", ROOT.getMap().get(Root.SIZE_STRING) },
-            { ROOT, "stringValue != null && stringValue.length() > 0", Boolean.FALSE},
-            { ROOT, "indexedStringValue != null && indexedStringValue.length() > 0", Boolean.TRUE},
+            { ROOT, "map[(\"s\" + \"i\") + \"ze\"]", ROOT.getMap().get( Root.SIZE_STRING ) },
+            { ROOT, "map[\"size\"]", ROOT.getMap().get( Root.SIZE_STRING ) },
+            { ROOT, "map[@org.apache.commons.ognl.test.objects.Root@SIZE_STRING]", ROOT.getMap().get( Root.SIZE_STRING ) },
+            { ROOT, "stringValue != null && stringValue.length() > 0", Boolean.FALSE },
+            { ROOT, "indexedStringValue != null && indexedStringValue.length() > 0", Boolean.TRUE },
             { ROOT.getMap(), "list", ROOT.getList() },
-            { ROOT, "map.array[0]", new Integer(ROOT.getArray()[0]) },
-            { ROOT, "map.list[1]", ROOT.getList().get(1) },
-            { ROOT, "map[^]", new Integer(99) },
+            { ROOT, "map.array[0]", new Integer( ROOT.getArray()[0] ) },
+            { ROOT, "map.list[1]", ROOT.getList().get( 1 ) },
+            { ROOT, "map[^]", new Integer( 99 ) },
             { ROOT, "map[$]", null },
-            { ROOT.getMap(), "array[$]", new Integer(ROOT.getArray()[ROOT.getArray().length-1]) },
+            { ROOT.getMap(), "array[$]", new Integer( ROOT.getArray()[ROOT.getArray().length - 1] ) },
             { ROOT, "[\"map\"]", ROOT.getMap() },
-            { ROOT.getArray(), "length", new Integer(ROOT.getArray().length) },
-            { ROOT, "getMap().list[|]", ROOT.getList().get(ROOT.getList().size()/2) },
-            { ROOT, "map.(array[2] + size())", new Integer(ROOT.getArray()[2] + ROOT.getMap().size()) },
+            { ROOT.getArray(), "length", new Integer( ROOT.getArray().length ) },
+            { ROOT, "getMap().list[|]", ROOT.getList().get( ROOT.getList().size() / 2 ) },
+            { ROOT, "map.(array[2] + size())", new Integer( ROOT.getArray()[2] + ROOT.getMap().size() ) },
             { ROOT, "map.(#this)", ROOT.getMap() },
-            { ROOT, "map.(#this != null ? #this['size'] : null)", ROOT.getMap().get(Root.SIZE_STRING) },
-            { ROOT, "map[^].(#this == null ? 'empty' : #this)", new Integer(99) },
+            { ROOT, "map.(#this != null ? #this['size'] : null)", ROOT.getMap().get( Root.SIZE_STRING ) },
+            { ROOT, "map[^].(#this == null ? 'empty' : #this)", new Integer( 99 ) },
             { ROOT, "map[$].(#this == null ? 'empty' : #this)", "empty" },
             { ROOT, "map[$].(#root == null ? 'empty' : #root)", ROOT },
-            { ROOT, "((selected != null) && (currLocale.toString() == selected.toString())) ? 'first' : 'second'", "first" },
-            { ROOT, "{stringValue, getMap()}", Arrays.asList(new Object[]{ROOT.getStringValue(), ROOT.getMap()})},
-            { ROOT, "{'stringValue', map[\"test\"].map[\"size\"]}", Arrays.asList(new Object[]{"stringValue", ROOT.getMap().get("size")}) },
-            { ROOT, "property.bean3.value + '(this.checked)'", "100(this.checked)"},
-            { ROOT, "getIndexedProperty(property.bean3.map[\"bar\"])", ROOT.getArray()},
-            { ROOT, "getProperty().getBean3()", ((Bean2)ROOT.getProperty()).getBean3()},
-            { ROOT, "intValue", new Integer(0), new Integer(2), new Integer(2) },
-            { ROOT, "! booleanValue", Boolean.TRUE},
-            { ROOT, "booleanValue", Boolean.FALSE, Boolean.TRUE, Boolean.TRUE},
-            { ROOT, "! disabled", new Boolean(false)},
-            { ROOT, "disabled || readonly", Boolean.TRUE},
-            { ROOT, "property.bean3.value != null", Boolean.TRUE},
-            { ROOT, "\"background-color:blue; width:\" + (currentLocaleVerbosity / 2) + \"px\"", "background-color:blue; width:43px"},
+            { ROOT, "((selected != null) && (currLocale.toString() == selected.toString())) ? 'first' : 'second'",
+                "first" },
+            { ROOT, "{stringValue, getMap()}", Arrays.asList( new Object[] { ROOT.getStringValue(), ROOT.getMap() } ) },
+            { ROOT, "{'stringValue', map[\"test\"].map[\"size\"]}",
+                Arrays.asList( new Object[] { "stringValue", ROOT.getMap().get( "size" ) } ) },
+            { ROOT, "property.bean3.value + '(this.checked)'", "100(this.checked)" },
+            { ROOT, "getIndexedProperty(property.bean3.map[\"bar\"])", ROOT.getArray() },
+            { ROOT, "getProperty().getBean3()", ( (Bean2) ROOT.getProperty() ).getBean3() },
+            { ROOT, "intValue", new Integer( 0 ), new Integer( 2 ), new Integer( 2 ) },
+            { ROOT, "! booleanValue", Boolean.TRUE },
+            { ROOT, "booleanValue", Boolean.FALSE, Boolean.TRUE, Boolean.TRUE },
+            { ROOT, "! disabled", new Boolean( false ) },
+            { ROOT, "disabled || readonly", Boolean.TRUE },
+            { ROOT, "property.bean3.value != null", Boolean.TRUE },
+            { ROOT, "\"background-color:blue; width:\" + (currentLocaleVerbosity / 2) + \"px\"",
+                "background-color:blue; width:43px" },
             { ROOT, "renderNavigation ? '' : 'noborder'", "noborder" },
             { ROOT, "format('key', array)", "formatted" },
             { ROOT, "format('key', intValue)", "formatted" },
             { ROOT, "format('key', map.size)", "formatted" },
-            { ROOT, "'disableButton(this,\"' + map.get('button-testing') + '\");clearElement("testFtpMessage")'",
-                    "disableButton(this,'null');clearElement('testFtpMessage')" },
-            { ROOT.getMap(), "!disableWarning", Boolean.TRUE},
-            { ROOT.getMap(), "get('value').bean3.value", new Integer(((Bean2)ROOT.getMap().get("value")).getBean3().getValue())},
-            { ROOT.getMap(), "\"Tapestry\".toCharArray()[2]", new Character('p')},
-            { ROOT.getMap(), "nested.deep.last", Boolean.TRUE},
-            { ROOT, "'last ' + getCurrentClass(@org.apache.commons.ognl.test.PropertyTest@VALUE)", "last foo stop"},
-            { ROOT, "@org.apache.commons.ognl.test.PropertyTest@formatValue(property.millis, true, true)", formatValue((int)((Bean2)ROOT.getProperty()).getMillis(), true, true) },
+            { ROOT,
+                "'disableButton(this,\"' + map.get('button-testing') + '\");clearElement("testFtpMessage")'",
+                "disableButton(this,'null');clearElement('testFtpMessage')" },
+            { ROOT.getMap(), "!disableWarning", Boolean.TRUE },
+            { ROOT.getMap(), "get('value').bean3.value",
+                new Integer( ( (Bean2) ROOT.getMap().get( "value" ) ).getBean3().getValue() ) },
+            { ROOT.getMap(), "\"Tapestry\".toCharArray()[2]", new Character( 'p' ) },
+            { ROOT.getMap(), "nested.deep.last", Boolean.TRUE },
+            { ROOT, "'last ' + getCurrentClass(@org.apache.commons.ognl.test.PropertyTest@VALUE)", "last foo stop" },
+            { ROOT, "@org.apache.commons.ognl.test.PropertyTest@formatValue(property.millis, true, true)",
+                formatValue( (int) ( (Bean2) ROOT.getProperty() ).getMillis(), true, true ) },
             { ROOT, "nullObject || !readonly", Boolean.TRUE },
-            { ROOT, "testDate == null ? '-' : @org.apache.commons.ognl.test.PropertyTest@DATETIME_FORMAT.format(testDate)", DATETIME_FORMAT.format(ROOT.getTestDate()) },
+            { ROOT,
+                "testDate == null ? '-' : @org.apache.commons.ognl.test.PropertyTest@DATETIME_FORMAT.format(testDate)",
+                DATETIME_FORMAT.format( ROOT.getTestDate() ) },
             { ROOT, "disabled ? 'disabled' : 'othernot'", "disabled" },
-            { BEAN, "two.getMessage(active ? 'ACT' : 'INA')", "[ACT]"},
-            { BEAN, "hasChildren('aaa')", Boolean.TRUE},
-            { BEAN, "two.hasChildren('aa')", Boolean.FALSE},
-            { BEAN, "two.hasChildren('a')", Boolean.FALSE},
-            { ROOT, "sorted ? (readonly ? 'currentSortDesc' : 'currentSortAsc') : 'currentSortNone'", "currentSortAsc"},
-            { ROOT, "getAsset( (width?'Yes':'No')+'Icon' )", "YesIcon"},
-            { ROOT, "flyingMonkey", Boolean.TRUE},
-            { ROOT, "expiration == null ? '' : @org.apache.commons.ognl.test.PropertyTest@DATE_FORMAT.format(expiration)", ""},
-            { ROOT, "printDelivery ? 'javascript:toggle(' + bean2.id + ');' : ''", "javascript:toggle(1);"},
-            { ROOT, "openTransitionWin", Boolean.FALSE},
-            { ROOT, "b.methodOfB(a.methodOfA(b)-1)", new Integer(0)},
-            { ROOT, "disabled", Boolean.TRUE},
-            { PROPERTY, "value", ""},
-            { PROPERTY, "search", "foo" }
-    };
+            { BEAN, "two.getMessage(active ? 'ACT' : 'INA')", "[ACT]" },
+            { BEAN, "hasChildren('aaa')", Boolean.TRUE },
+            { BEAN, "two.hasChildren('aa')", Boolean.FALSE },
+            { BEAN, "two.hasChildren('a')", Boolean.FALSE },
+            { ROOT, "sorted ? (readonly ? 'currentSortDesc' : 'currentSortAsc') : 'currentSortNone'", "currentSortAsc" },
+            { ROOT, "getAsset( (width?'Yes':'No')+'Icon' )", "YesIcon" },
+            { ROOT, "flyingMonkey", Boolean.TRUE },
+            { ROOT,
+                "expiration == null ? '' : @org.apache.commons.ognl.test.PropertyTest@DATE_FORMAT.format(expiration)",
+                "" }, { ROOT, "printDelivery ? 'javascript:toggle(' + bean2.id + ');' : ''", "javascript:toggle(1);" },
+            { ROOT, "openTransitionWin", Boolean.FALSE }, { ROOT, "b.methodOfB(a.methodOfA(b)-1)", new Integer( 0 ) },
+            { ROOT, "disabled", Boolean.TRUE }, { PROPERTY, "value", "" }, { PROPERTY, "search", "foo" } };
 
-    public static String formatValue(int millis, boolean b1, boolean b2)
+    public static String formatValue( int millis, boolean b1, boolean b2 )
     {
         return millis + "-formatted";
     }
 
-    /*===================================================================
-         Public static methods
-       ===================================================================*/
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
 
-            if (TESTS[i].length == 5) {
+            if ( TESTS[i].length == 5 )
+            {
 
-                result.addTest(new PropertyTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3], TESTS[i][4]));
-            } else
-                result.addTest(new PropertyTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2]));
+                result.addTest( new PropertyTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1], TESTS[i][2],
+                                                  TESTS[i][3], TESTS[i][4] ) );
+            }
+            else
+                result.addTest( new PropertyTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1], TESTS[i][2] ) );
         }
-        
+
         return result;
     }
 
-    /*===================================================================
-         Constructors
-       ===================================================================*/
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
     public PropertyTest()
     {
         super();
     }
 
-    public PropertyTest(String name)
+    public PropertyTest( String name )
     {
-        super(name);
+        super( name );
     }
 
-    public PropertyTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public PropertyTest( String name, Object root, String expressionString, Object expectedResult, Object setValue,
+                         Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public PropertyTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public PropertyTest( String name, Object root, String expressionString, Object expectedResult, Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public PropertyTest(String name, Object root, String expressionString, Object expectedResult)
+    public PropertyTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ProtectedInnerClassTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ProtectedInnerClassTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ProtectedInnerClassTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ProtectedInnerClassTest.java Sat May 14 13:18:29 2011
@@ -22,16 +22,15 @@ package org.apache.commons.ognl.test;
 import junit.framework.TestSuite;
 import org.apache.commons.ognl.test.objects.Root;
 
-public class ProtectedInnerClassTest extends OgnlTestCase
+public class ProtectedInnerClassTest
+    extends OgnlTestCase
 {
 
     private static Root ROOT = new Root();
 
     private static Object[][] TESTS = {
-    // member access of inner class (Arrays.asList() returned protected inner class)
-            { ROOT, "list.size()", new Integer(ROOT.getList().size()) }, 
-            { ROOT, "list[0]", ROOT.getList().get(0) },
-    };
+        // member access of inner class (Arrays.asList() returned protected inner class)
+        { ROOT, "list.size()", new Integer( ROOT.getList().size() ) }, { ROOT, "list[0]", ROOT.getList().get( 0 ) }, };
 
     /*
      * =================================================================== Public static methods
@@ -41,9 +40,10 @@ public class ProtectedInnerClassTest ext
     {
         TestSuite result = new TestSuite();
 
-        for(int i = 0; i < TESTS.length; i++) {
-            result.addTest(new ProtectedInnerClassTest((String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
-                    TESTS[i][2]));
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            result.addTest( new ProtectedInnerClassTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
+                                                         TESTS[i][2] ) );
         }
         return result;
     }
@@ -57,25 +57,25 @@ public class ProtectedInnerClassTest ext
         super();
     }
 
-    public ProtectedInnerClassTest(String name)
+    public ProtectedInnerClassTest( String name )
     {
-        super(name);
+        super( name );
     }
 
-    public ProtectedInnerClassTest(String name, Object root, String expressionString, Object expectedResult,
-            Object setValue, Object expectedAfterSetResult)
+    public ProtectedInnerClassTest( String name, Object root, String expressionString, Object expectedResult,
+                                    Object setValue, Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public ProtectedInnerClassTest(String name, Object root, String expressionString, Object expectedResult,
-            Object setValue)
+    public ProtectedInnerClassTest( String name, Object root, String expressionString, Object expectedResult,
+                                    Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public ProtectedInnerClassTest(String name, Object root, String expressionString, Object expectedResult)
+    public ProtectedInnerClassTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/QuotingTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/QuotingTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/QuotingTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/QuotingTest.java Sat May 14 13:18:29 2011
@@ -21,36 +21,46 @@ package org.apache.commons.ognl.test;
 
 import junit.framework.TestSuite;
 
-public class QuotingTest extends OgnlTestCase
+public class QuotingTest
+    extends OgnlTestCase
 {
     private static Object[][] TESTS = {
-            // Quoting
-            { null, "`c`", new Character('c') },
-            { null, "'s'", new Character('s') },
-            { null, "'string'", "string" },
-            { null, "\"string\"", "string" },
-            { null, "'' + 'bar'", "bar"},
-            { null, "'yyyy\u539Add\u5EA6'", "yyyy\u539Add\u5EA6"}
-    };
-
-    /*===================================================================
-         Public static methods
-       ===================================================================*/
+        // Quoting
+        { null, "`c`", new Character( 'c' ) }, { null, "'s'", new Character( 's' ) }, { null, "'string'", "string" },
+        { null, "\"string\"", "string" }, { null, "'' + 'bar'", "bar" },
+        { null, "'yyyy\u539Add\u5EA6'", "yyyy\u539Add\u5EA6" } };
+
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
-            if (TESTS[i].length == 3) {
-                result.addTest(new QuotingTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2]));
-            } else {
-                if (TESTS[i].length == 4) {
-                    result.addTest(new QuotingTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3]));
-                } else {
-                    if (TESTS[i].length == 5) {
-                        result.addTest(new QuotingTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3], TESTS[i][4]));
-                    } else {
-                        throw new RuntimeException("don't understand TEST format");
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            if ( TESTS[i].length == 3 )
+            {
+                result.addTest( new QuotingTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1], TESTS[i][2] ) );
+            }
+            else
+            {
+                if ( TESTS[i].length == 4 )
+                {
+                    result.addTest( new QuotingTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
+                                                     TESTS[i][2], TESTS[i][3] ) );
+                }
+                else
+                {
+                    if ( TESTS[i].length == 5 )
+                    {
+                        result.addTest( new QuotingTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
+                                                         TESTS[i][2], TESTS[i][3], TESTS[i][4] ) );
+                    }
+                    else
+                    {
+                        throw new RuntimeException( "don't understand TEST format" );
                     }
                 }
             }
@@ -58,31 +68,33 @@ public class QuotingTest extends OgnlTes
         return result;
     }
 
-    /*===================================================================
-         Constructors
-       ===================================================================*/
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
     public QuotingTest()
     {
         super();
     }
 
-    public QuotingTest(String name)
+    public QuotingTest( String name )
     {
-        super(name);
+        super( name );
     }
 
-    public QuotingTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public QuotingTest( String name, Object root, String expressionString, Object expectedResult, Object setValue,
+                        Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public QuotingTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public QuotingTest( String name, Object root, String expressionString, Object expectedResult, Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public QuotingTest(String name, Object root, String expressionString, Object expectedResult)
+    public QuotingTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java Sat May 14 13:18:29 2011
@@ -28,59 +28,74 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Set;
 
-public class SetterTest extends OgnlTestCase
+public class SetterTest
+    extends OgnlTestCase
 {
-    private static Root             ROOT = new Root();
+    private static Root ROOT = new Root();
 
     static Set _list = new HashSet();
-    static {
-        _list.add("Test1");
+    static
+    {
+        _list.add( "Test1" );
     }
 
-    private static Object[][]       TESTS = {
-            // Setting values
-            { ROOT.getMap(), "newValue", null, new Integer(101) },
-            { ROOT, "settableList[0]", "foo", "quux" }, // absolute indexes
-            { ROOT, "settableList[0]", "quux" },
-            { ROOT, "settableList[2]", "baz", "quux" },
-            { ROOT, "settableList[2]", "quux" },
-            { ROOT, "settableList[$]", "quux", "oompa" }, // special indexes
-            { ROOT, "settableList[$]", "oompa" },
-            { ROOT, "settableList[^]", "quux", "oompa" },
-            { ROOT, "settableList[^]", "oompa" },
-            { ROOT, "settableList[|]", "bar", "oompa" },
-            { ROOT, "settableList[|]", "oompa" },
-            { ROOT, "map.newValue", new Integer(101), new Integer(555) },
-            { ROOT, "map", ROOT.getMap(), new HashMap(), NoSuchPropertyException.class },
-            { ROOT.getMap(), "newValue2 || put(\"newValue2\",987), newValue2", new Integer(987), new Integer(1002) },
-            { ROOT, "map.(someMissingKey || newValue)", new Integer(555), new Integer(666) },
-            { ROOT.getMap(), "newValue || someMissingKey", new Integer(666), new Integer(666) }, // no setting happens!
-            { ROOT, "map.(newValue && aKey)", null, new Integer(54321)},
-            { ROOT, "map.(someMissingKey && newValue)", null, null }, // again, no setting
-            { null, "0", new Integer(0), null, InappropriateExpressionException.class }, // illegal for setting, no property
-            { ROOT, "map[0]=\"map.newValue\", map[0](#this)", new Integer(666), new Integer(888) },
-            { ROOT, "selectedList", null, _list, IllegalArgumentException.class},
-            { ROOT, "openTransitionWin", Boolean.FALSE, Boolean.TRUE}
-    };
-
-    /*===================================================================
-         Public static methods
-       ===================================================================*/
+    private static Object[][] TESTS = {
+        // Setting values
+        { ROOT.getMap(), "newValue", null, new Integer( 101 ) },
+        { ROOT, "settableList[0]", "foo", "quux" }, // absolute indexes
+        { ROOT, "settableList[0]", "quux" },
+        { ROOT, "settableList[2]", "baz", "quux" },
+        { ROOT, "settableList[2]", "quux" },
+        { ROOT, "settableList[$]", "quux", "oompa" }, // special indexes
+        { ROOT, "settableList[$]", "oompa" },
+        { ROOT, "settableList[^]", "quux", "oompa" },
+        { ROOT, "settableList[^]", "oompa" },
+        { ROOT, "settableList[|]", "bar", "oompa" },
+        { ROOT, "settableList[|]", "oompa" },
+        { ROOT, "map.newValue", new Integer( 101 ), new Integer( 555 ) },
+        { ROOT, "map", ROOT.getMap(), new HashMap(), NoSuchPropertyException.class },
+        { ROOT.getMap(), "newValue2 || put(\"newValue2\",987), newValue2", new Integer( 987 ), new Integer( 1002 ) },
+        { ROOT, "map.(someMissingKey || newValue)", new Integer( 555 ), new Integer( 666 ) },
+        { ROOT.getMap(), "newValue || someMissingKey", new Integer( 666 ), new Integer( 666 ) }, // no setting happens!
+        { ROOT, "map.(newValue && aKey)", null, new Integer( 54321 ) },
+        { ROOT, "map.(someMissingKey && newValue)", null, null }, // again, no setting
+        { null, "0", new Integer( 0 ), null, InappropriateExpressionException.class }, // illegal for setting, no
+                                                                                       // property
+        { ROOT, "map[0]=\"map.newValue\", map[0](#this)", new Integer( 666 ), new Integer( 888 ) },
+        { ROOT, "selectedList", null, _list, IllegalArgumentException.class },
+        { ROOT, "openTransitionWin", Boolean.FALSE, Boolean.TRUE } };
+
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
-            if (TESTS[i].length == 3) {
-                result.addTest(new SetterTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2]));
-            } else {
-                if (TESTS[i].length == 4) {
-                    result.addTest(new SetterTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3]));
-                } else {
-                    if (TESTS[i].length == 5) {
-                        result.addTest(new SetterTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3], TESTS[i][4]));
-                    } else {
-                        throw new RuntimeException("don't understand TEST format");
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            if ( TESTS[i].length == 3 )
+            {
+                result.addTest( new SetterTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1], TESTS[i][2] ) );
+            }
+            else
+            {
+                if ( TESTS[i].length == 4 )
+                {
+                    result.addTest( new SetterTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
+                                                    TESTS[i][2], TESTS[i][3] ) );
+                }
+                else
+                {
+                    if ( TESTS[i].length == 5 )
+                    {
+                        result.addTest( new SetterTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
+                                                        TESTS[i][2], TESTS[i][3], TESTS[i][4] ) );
+                    }
+                    else
+                    {
+                        throw new RuntimeException( "don't understand TEST format" );
                     }
                 }
             }
@@ -88,31 +103,33 @@ public class SetterTest extends OgnlTest
         return result;
     }
 
-    /*===================================================================
-         Constructors
-       ===================================================================*/
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
     public SetterTest()
     {
         super();
     }
 
-    public SetterTest(String name)
+    public SetterTest( String name )
     {
-        super(name);
+        super( name );
     }
 
-    public SetterTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public SetterTest( String name, Object root, String expressionString, Object expectedResult, Object setValue,
+                       Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public SetterTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public SetterTest( String name, Object root, String expressionString, Object expectedResult, Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public SetterTest(String name, Object root, String expressionString, Object expectedResult)
+    public SetterTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterWithConversionTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterWithConversionTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterWithConversionTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterWithConversionTest.java Sat May 14 13:18:29 2011
@@ -22,44 +22,60 @@ package org.apache.commons.ognl.test;
 import junit.framework.TestSuite;
 import org.apache.commons.ognl.test.objects.Root;
 
-public class SetterWithConversionTest extends OgnlTestCase
+public class SetterWithConversionTest
+    extends OgnlTestCase
 {
-    private static Root             ROOT = new Root();
+    private static Root ROOT = new Root();
 
-    private static Object[][]       TESTS = {
-                                        // Property set with conversion
-                                        { ROOT, "intValue", new Integer(0), new Double(6.5), new Integer(6) },
-                                        { ROOT, "intValue", new Integer(6), new Double(1025.87645), new Integer(1025) },
-                                        { ROOT, "intValue", new Integer(1025), "654", new Integer(654) },
-                                        { ROOT, "stringValue", null, new Integer(25), "25" },
-                                        { ROOT, "stringValue", "25", new Float(100.25), "100.25" },
-                                        { ROOT, "anotherStringValue", "foo", new Integer(0), "0" },
-                                        { ROOT, "anotherStringValue", "0", new Double(0.5), "0.5" },
-                                        { ROOT, "anotherIntValue", new Integer(123), "5", new Integer(5) },
-                                        { ROOT, "anotherIntValue", new Integer(5), new Double(100.25), new Integer(100) },
-                                //          { ROOT, "anotherIntValue", new Integer(100), new String[] { "55" }, new Integer(55)},
-                                //          { ROOT, "yetAnotherIntValue", new Integer(46), new String[] { "55" }, new Integer(55)},
-
-                                    };
-
-	/*===================================================================
-		Public static methods
-	  ===================================================================*/
+    private static Object[][] TESTS = {
+        // Property set with conversion
+        { ROOT, "intValue", new Integer( 0 ), new Double( 6.5 ), new Integer( 6 ) },
+        { ROOT, "intValue", new Integer( 6 ), new Double( 1025.87645 ), new Integer( 1025 ) },
+        { ROOT, "intValue", new Integer( 1025 ), "654", new Integer( 654 ) },
+        { ROOT, "stringValue", null, new Integer( 25 ), "25" },
+        { ROOT, "stringValue", "25", new Float( 100.25 ), "100.25" },
+        { ROOT, "anotherStringValue", "foo", new Integer( 0 ), "0" },
+        { ROOT, "anotherStringValue", "0", new Double( 0.5 ), "0.5" },
+        { ROOT, "anotherIntValue", new Integer( 123 ), "5", new Integer( 5 ) },
+        { ROOT, "anotherIntValue", new Integer( 5 ), new Double( 100.25 ), new Integer( 100 ) },
+    // { ROOT, "anotherIntValue", new Integer(100), new String[] { "55" }, new Integer(55)},
+    // { ROOT, "yetAnotherIntValue", new Integer(46), new String[] { "55" }, new Integer(55)},
+
+        };
+
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
-            if (TESTS[i].length == 3) {
-                result.addTest(new SetterWithConversionTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2]));
-            } else {
-                if (TESTS[i].length == 4) {
-                    result.addTest(new SetterWithConversionTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3]));
-                } else {
-                    if (TESTS[i].length == 5) {
-                        result.addTest(new SetterWithConversionTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3], TESTS[i][4]));
-                    } else {
-                        throw new RuntimeException("don't understand TEST format");
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            if ( TESTS[i].length == 3 )
+            {
+                result.addTest( new SetterWithConversionTest( (String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
+                                                              TESTS[i][2] ) );
+            }
+            else
+            {
+                if ( TESTS[i].length == 4 )
+                {
+                    result.addTest( new SetterWithConversionTest( (String) TESTS[i][1], TESTS[i][0],
+                                                                  (String) TESTS[i][1], TESTS[i][2], TESTS[i][3] ) );
+                }
+                else
+                {
+                    if ( TESTS[i].length == 5 )
+                    {
+                        result.addTest( new SetterWithConversionTest( (String) TESTS[i][1], TESTS[i][0],
+                                                                      (String) TESTS[i][1], TESTS[i][2], TESTS[i][3],
+                                                                      TESTS[i][4] ) );
+                    }
+                    else
+                    {
+                        throw new RuntimeException( "don't understand TEST format" );
                     }
                 }
             }
@@ -67,31 +83,34 @@ public class SetterWithConversionTest ex
         return result;
     }
 
-	/*===================================================================
-		Constructors
-	  ===================================================================*/
-	public SetterWithConversionTest()
-	{
-	    super();
-	}
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
+    public SetterWithConversionTest()
+    {
+        super();
+    }
 
-	public SetterWithConversionTest(String name)
-	{
-	    super(name);
-	}
+    public SetterWithConversionTest( String name )
+    {
+        super( name );
+    }
 
-    public SetterWithConversionTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public SetterWithConversionTest( String name, Object root, String expressionString, Object expectedResult,
+                                     Object setValue, Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public SetterWithConversionTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public SetterWithConversionTest( String name, Object root, String expressionString, Object expectedResult,
+                                     Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public SetterWithConversionTest(String name, Object root, String expressionString, Object expectedResult)
+    public SetterWithConversionTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ShortCircuitingExpressionTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ShortCircuitingExpressionTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ShortCircuitingExpressionTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/ShortCircuitingExpressionTest.java Sat May 14 13:18:29 2011
@@ -23,57 +23,60 @@ import junit.framework.TestSuite;
 import org.apache.commons.ognl.NoSuchPropertyException;
 import org.apache.commons.ognl.OgnlException;
 
-public class ShortCircuitingExpressionTest extends OgnlTestCase
+public class ShortCircuitingExpressionTest
+    extends OgnlTestCase
 {
-    private static Object[][]       TESTS = {
-        { "#root ? someProperty : 99", new Integer(99) },
+    private static Object[][] TESTS = { { "#root ? someProperty : 99", new Integer( 99 ) },
         { "#root ? 99 : someProperty", OgnlException.class },
         { "(#x=99)? #x.someProperty : #x", NoSuchPropertyException.class },
-        { "#xyzzy.doubleValue()", NullPointerException.class },
-        { "#xyzzy && #xyzzy.doubleValue()", null },
-        { "(#x=99) && #x.doubleValue()", new Double(99) },
-        { "#xyzzy || 101", new Integer(101) },
-        { "99 || 101", new Integer(99) },
-    };
-
-	/*===================================================================
-		Public static methods
-	  ===================================================================*/
+        { "#xyzzy.doubleValue()", NullPointerException.class }, { "#xyzzy && #xyzzy.doubleValue()", null },
+        { "(#x=99) && #x.doubleValue()", new Double( 99 ) }, { "#xyzzy || 101", new Integer( 101 ) },
+        { "99 || 101", new Integer( 99 ) }, };
+
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
-            result.addTest(new ShortCircuitingExpressionTest((String)TESTS[i][0] + " (" + TESTS[i][1] + ")", null, (String)TESTS[i][0], TESTS[i][1]));
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            result.addTest( new ShortCircuitingExpressionTest( (String) TESTS[i][0] + " (" + TESTS[i][1] + ")", null,
+                                                               (String) TESTS[i][0], TESTS[i][1] ) );
         }
         return result;
     }
 
-	/*===================================================================
-		Constructors
-	  ===================================================================*/
-	public ShortCircuitingExpressionTest()
-	{
-	    super();
-	}
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
+    public ShortCircuitingExpressionTest()
+    {
+        super();
+    }
 
-	public ShortCircuitingExpressionTest(String name)
-	{
-	    super(name);
-	}
+    public ShortCircuitingExpressionTest( String name )
+    {
+        super( name );
+    }
 
-    public ShortCircuitingExpressionTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public ShortCircuitingExpressionTest( String name, Object root, String expressionString, Object expectedResult,
+                                          Object setValue, Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public ShortCircuitingExpressionTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public ShortCircuitingExpressionTest( String name, Object root, String expressionString, Object expectedResult,
+                                          Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public ShortCircuitingExpressionTest(String name, Object root, String expressionString, Object expectedResult)
+    public ShortCircuitingExpressionTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimpleNavigationChainTreeTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimpleNavigationChainTreeTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimpleNavigationChainTreeTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimpleNavigationChainTreeTest.java Sat May 14 13:18:29 2011
@@ -22,61 +22,67 @@ package org.apache.commons.ognl.test;
 import junit.framework.TestSuite;
 import org.apache.commons.ognl.Ognl;
 
-public class SimpleNavigationChainTreeTest extends OgnlTestCase {
-    
-    private static Object[][] TESTS = {
-            {"name", Boolean.TRUE},
-            {"name[i]", Boolean.FALSE},
-            {"name + foo", Boolean.FALSE},
-            {"name.foo", Boolean.TRUE}
-    };
-
-    /*===================================================================
-         Public static methods
-       ===================================================================*/
+public class SimpleNavigationChainTreeTest
+    extends OgnlTestCase
+{
+
+    private static Object[][] TESTS = { { "name", Boolean.TRUE }, { "name[i]", Boolean.FALSE },
+        { "name + foo", Boolean.FALSE }, { "name.foo", Boolean.TRUE } };
+
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
         TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
-            result.addTest(new SimpleNavigationChainTreeTest((String) TESTS[i][0] + " (" + TESTS[i][1] + ")", null, (String) TESTS[i][0], TESTS[i][1]));
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            result.addTest( new SimpleNavigationChainTreeTest( (String) TESTS[i][0] + " (" + TESTS[i][1] + ")", null,
+                                                               (String) TESTS[i][0], TESTS[i][1] ) );
         }
         return result;
     }
 
-    /*===================================================================
-         Constructors
-       ===================================================================*/
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
     public SimpleNavigationChainTreeTest()
     {
         super();
     }
 
-    public SimpleNavigationChainTreeTest(String name)
+    public SimpleNavigationChainTreeTest( String name )
     {
-        super(name);
+        super( name );
     }
 
-    public SimpleNavigationChainTreeTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public SimpleNavigationChainTreeTest( String name, Object root, String expressionString, Object expectedResult,
+                                          Object setValue, Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public SimpleNavigationChainTreeTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public SimpleNavigationChainTreeTest( String name, Object root, String expressionString, Object expectedResult,
+                                          Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public SimpleNavigationChainTreeTest(String name, Object root, String expressionString, Object expectedResult)
+    public SimpleNavigationChainTreeTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 
-    /*===================================================================
-         Overridden methods
-       ===================================================================*/
-    protected void runTest() throws Exception
+    /*
+     * =================================================================== Overridden methods
+     * ===================================================================
+     */
+    protected void runTest()
+        throws Exception
     {
-        assertTrue(Ognl.isSimpleNavigationChain(getExpression(), _context) == ((Boolean) getExpectedResult()).booleanValue());
+        assertTrue( Ognl.isSimpleNavigationChain( getExpression(), _context ) == ( (Boolean) getExpectedResult() ).booleanValue() );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimplePropertyTreeTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimplePropertyTreeTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimplePropertyTreeTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SimplePropertyTreeTest.java Sat May 14 13:18:29 2011
@@ -22,65 +22,67 @@ package org.apache.commons.ognl.test;
 import junit.framework.TestSuite;
 import org.apache.commons.ognl.Ognl;
 
-public class SimplePropertyTreeTest extends OgnlTestCase
+public class SimplePropertyTreeTest
+    extends OgnlTestCase
 {
-    private static Object[][]       TESTS = {
-            { "name", Boolean.TRUE },
-            { "foo", Boolean.TRUE },
-            { "name[i]", Boolean.FALSE },
-            { "name + foo", Boolean.FALSE },
-            { "name.foo", Boolean.FALSE },
-            { "name.foo.bar", Boolean.FALSE },
-            { "name.{? foo }", Boolean.FALSE },
-            { "name.( foo )", Boolean.FALSE }
-    };
-
-    /*===================================================================
-         Public static methods
-       ===================================================================*/
+    private static Object[][] TESTS = { { "name", Boolean.TRUE }, { "foo", Boolean.TRUE },
+        { "name[i]", Boolean.FALSE }, { "name + foo", Boolean.FALSE }, { "name.foo", Boolean.FALSE },
+        { "name.foo.bar", Boolean.FALSE }, { "name.{? foo }", Boolean.FALSE }, { "name.( foo )", Boolean.FALSE } };
+
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
-            result.addTest(new SimplePropertyTreeTest((String)TESTS[i][0] + " (" + TESTS[i][1] + ")", null, (String)TESTS[i][0], TESTS[i][1]));
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            result.addTest( new SimplePropertyTreeTest( (String) TESTS[i][0] + " (" + TESTS[i][1] + ")", null,
+                                                        (String) TESTS[i][0], TESTS[i][1] ) );
         }
         return result;
     }
 
-    /*===================================================================
-         Constructors
-       ===================================================================*/
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
     public SimplePropertyTreeTest()
     {
         super();
     }
 
-    public SimplePropertyTreeTest(String name)
+    public SimplePropertyTreeTest( String name )
     {
-        super(name);
+        super( name );
     }
 
-    public SimplePropertyTreeTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public SimplePropertyTreeTest( String name, Object root, String expressionString, Object expectedResult,
+                                   Object setValue, Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public SimplePropertyTreeTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public SimplePropertyTreeTest( String name, Object root, String expressionString, Object expectedResult,
+                                   Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public SimplePropertyTreeTest(String name, Object root, String expressionString, Object expectedResult)
+    public SimplePropertyTreeTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 
-    /*===================================================================
-         Overridden methods
-       ===================================================================*/
-    protected void runTest() throws Exception
+    /*
+     * =================================================================== Overridden methods
+     * ===================================================================
+     */
+    protected void runTest()
+        throws Exception
     {
-        assertTrue(Ognl.isSimpleProperty(getExpression(), _context) == ((Boolean)getExpectedResult()).booleanValue());
+        assertTrue( Ognl.isSimpleProperty( getExpression(), _context ) == ( (Boolean) getExpectedResult() ).booleanValue() );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/StaticsAndConstructorsTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/StaticsAndConstructorsTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/StaticsAndConstructorsTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/StaticsAndConstructorsTest.java Sat May 14 13:18:29 2011
@@ -23,14 +23,16 @@ import junit.framework.TestSuite;
 import org.apache.commons.ognl.test.objects.Root;
 import org.apache.commons.ognl.test.objects.Simple;
 
-public class StaticsAndConstructorsTest extends OgnlTestCase
+public class StaticsAndConstructorsTest
+    extends OgnlTestCase
 {
     private static Root ROOT = new Root();
 
-    private static Object[][]       TESTS = {
+    private static Object[][] TESTS =
+        {
             { "@java.lang.Class@forName(\"java.lang.Object\")", Object.class },
-            { "@java.lang.Integer@MAX_VALUE", new Integer(Integer.MAX_VALUE) },
-            { "@@max(3,4)", new Integer(4) },
+            { "@java.lang.Integer@MAX_VALUE", new Integer( Integer.MAX_VALUE ) },
+            { "@@max(3,4)", new Integer( 4 ) },
             { "new java.lang.StringBuffer().append(55).toString()", "55" },
             { "class", ROOT.getClass() },
             { "@org.apache.commons.ognl.test.objects.Root@class", ROOT.getClass() },
@@ -40,22 +42,27 @@ public class StaticsAndConstructorsTest 
             { "class.getSuperclass()", ROOT.getClass().getSuperclass() },
             { "class.superclass", ROOT.getClass().getSuperclass() },
             { "class.name", ROOT.getClass().getName() },
-            { "getStaticInt()", new Integer(Root.getStaticInt()) },
-            { "@org.apache.commons.ognl.test.objects.Root@getStaticInt()", new Integer(Root.getStaticInt()) },
-            { "new org.apache.commons.ognl.test.objects.Simple(property).getStringValue()", new Simple().getStringValue() },
-            { "new org.apache.commons.ognl.test.objects.Simple(map['test'].property).getStringValue()", new Simple().getStringValue() },
-            { "map.test.getCurrentClass(@org.apache.commons.ognl.test.StaticsAndConstructorsTest@KEY.toString())", "size stop"},
-            { "new org.apache.commons.ognl.test.StaticsAndConstructorsTest$IntWrapper(index)", new IntWrapper(ROOT.getIndex()) },
-            { "new org.apache.commons.ognl.test.StaticsAndConstructorsTest$IntObjectWrapper(index)", new IntObjectWrapper(ROOT.getIndex()) },
-            { "new org.apache.commons.ognl.test.StaticsAndConstructorsTest$A(#root)", new A(ROOT)},
-            {"@org.apache.commons.ognl.test.StaticsAndConstructorsTest$Animals@values().length != 2", Boolean.TRUE},
-            {"isOk(@org.apache.commons.ognl.test.objects.SimpleEnum@ONE, null)", Boolean.TRUE},
-    };
+            { "getStaticInt()", new Integer( Root.getStaticInt() ) },
+            { "@org.apache.commons.ognl.test.objects.Root@getStaticInt()", new Integer( Root.getStaticInt() ) },
+            { "new org.apache.commons.ognl.test.objects.Simple(property).getStringValue()",
+                new Simple().getStringValue() },
+            { "new org.apache.commons.ognl.test.objects.Simple(map['test'].property).getStringValue()",
+                new Simple().getStringValue() },
+            { "map.test.getCurrentClass(@org.apache.commons.ognl.test.StaticsAndConstructorsTest@KEY.toString())",
+                "size stop" },
+            { "new org.apache.commons.ognl.test.StaticsAndConstructorsTest$IntWrapper(index)",
+                new IntWrapper( ROOT.getIndex() ) },
+            { "new org.apache.commons.ognl.test.StaticsAndConstructorsTest$IntObjectWrapper(index)",
+                new IntObjectWrapper( ROOT.getIndex() ) },
+            { "new org.apache.commons.ognl.test.StaticsAndConstructorsTest$A(#root)", new A( ROOT ) },
+            { "@org.apache.commons.ognl.test.StaticsAndConstructorsTest$Animals@values().length != 2", Boolean.TRUE },
+            { "isOk(@org.apache.commons.ognl.test.objects.SimpleEnum@ONE, null)", Boolean.TRUE }, };
 
     public static final String KEY = "size";
 
-    public static class IntWrapper {
-        public IntWrapper(int value)
+    public static class IntWrapper
+    {
+        public IntWrapper( int value )
         {
             this.value = value;
         }
@@ -64,14 +71,14 @@ public class StaticsAndConstructorsTest 
 
         public String toString()
         {
-            return Integer.toString(value);
+            return Integer.toString( value );
         }
 
-        public boolean equals(Object o)
+        public boolean equals( Object o )
         {
-            if (this == o)
+            if ( this == o )
                 return true;
-            if (o == null || getClass() != o.getClass())
+            if ( o == null || getClass() != o.getClass() )
                 return false;
 
             IntWrapper that = (IntWrapper) o;
@@ -80,9 +87,10 @@ public class StaticsAndConstructorsTest 
         }
     }
 
-    public static class IntObjectWrapper {
+    public static class IntObjectWrapper
+    {
 
-        public IntObjectWrapper(Integer value)
+        public IntObjectWrapper( Integer value )
         {
             this.value = value;
         }
@@ -94,16 +102,16 @@ public class StaticsAndConstructorsTest 
             return value.toString();
         }
 
-        public boolean equals(Object o)
+        public boolean equals( Object o )
         {
-            if (this == o)
+            if ( this == o )
                 return true;
-            if (o == null || getClass() != o.getClass())
+            if ( o == null || getClass() != o.getClass() )
                 return false;
 
             IntObjectWrapper that = (IntObjectWrapper) o;
 
-            return value.equals(that.value);
+            return value.equals( that.value );
         }
     }
 
@@ -111,67 +119,77 @@ public class StaticsAndConstructorsTest 
     {
         String key = "A";
 
-        public A(Root root)
+        public A( Root root )
         {
 
         }
 
-        public boolean equals(Object o)
+        public boolean equals( Object o )
         {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
+            if ( this == o )
+                return true;
+            if ( o == null || getClass() != o.getClass() )
+                return false;
 
             A a = (A) o;
 
-            if (key != null ? !key.equals(a.key) : a.key != null) return false;
+            if ( key != null ? !key.equals( a.key ) : a.key != null )
+                return false;
 
             return true;
         }
     }
 
-    public enum Animals {
+    public enum Animals
+    {
 
         Dog, Cat, Wallabee, Bear
     }
 
-    /*===================================================================
-         Public static methods
-       ===================================================================*/
+    /*
+     * =================================================================== Public static methods
+     * ===================================================================
+     */
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        TestSuite result = new TestSuite();
 
-        for (int i = 0; i < TESTS.length; i++) {
-            result.addTest(new StaticsAndConstructorsTest((String)TESTS[i][0] + " (" + TESTS[i][1] + ")", ROOT, (String)TESTS[i][0], TESTS[i][1]));
+        for ( int i = 0; i < TESTS.length; i++ )
+        {
+            result.addTest( new StaticsAndConstructorsTest( (String) TESTS[i][0] + " (" + TESTS[i][1] + ")", ROOT,
+                                                            (String) TESTS[i][0], TESTS[i][1] ) );
         }
         return result;
     }
 
-    /*===================================================================
-         Constructors
-       ===================================================================*/
+    /*
+     * =================================================================== Constructors
+     * ===================================================================
+     */
     public StaticsAndConstructorsTest()
     {
         super();
     }
 
-    public StaticsAndConstructorsTest(String name)
+    public StaticsAndConstructorsTest( String name )
     {
-        super(name);
+        super( name );
     }
 
-    public StaticsAndConstructorsTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
+    public StaticsAndConstructorsTest( String name, Object root, String expressionString, Object expectedResult,
+                                       Object setValue, Object expectedAfterSetResult )
     {
-        super(name, root, expressionString, expectedResult, setValue, expectedAfterSetResult);
+        super( name, root, expressionString, expectedResult, setValue, expectedAfterSetResult );
     }
 
-    public StaticsAndConstructorsTest(String name, Object root, String expressionString, Object expectedResult, Object setValue)
+    public StaticsAndConstructorsTest( String name, Object root, String expressionString, Object expectedResult,
+                                       Object setValue )
     {
-        super(name, root, expressionString, expectedResult, setValue);
+        super( name, root, expressionString, expectedResult, setValue );
     }
 
-    public StaticsAndConstructorsTest(String name, Object root, String expressionString, Object expectedResult)
+    public StaticsAndConstructorsTest( String name, Object root, String expressionString, Object expectedResult )
     {
-        super(name, root, expressionString, expectedResult);
+        super( name, root, expressionString, expectedResult );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/accessors/ListPropertyAccessorTest.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/accessors/ListPropertyAccessorTest.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/accessors/ListPropertyAccessorTest.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/accessors/ListPropertyAccessorTest.java Sat May 14 13:18:29 2011
@@ -33,7 +33,9 @@ import java.util.List;
 /**
  * Tests functionality of various built in object accessors.
  */
-public class ListPropertyAccessorTest extends TestCase {
+public class ListPropertyAccessorTest
+    extends TestCase
+{
 
     public void test_Get_Source_String_Number_Index()
     {
@@ -41,17 +43,17 @@ public class ListPropertyAccessorTest ex
 
         Root root = new Root();
 
-        OgnlContext context = (OgnlContext) Ognl.createDefaultContext(null);
-        context.setRoot(root);
-        context.setCurrentObject(root);
-        context.setCurrentType(Integer.TYPE);
-
-        assertEquals(".get(0)", pa.getSourceAccessor(context, root.getList(), "0"));
-
-        assertEquals(List.class, context.getCurrentAccessor());
-        assertEquals(Object.class, context.getCurrentType());
-        assertEquals(Integer.TYPE, context.getPreviousType());
-        assertEquals(null, context.getPreviousAccessor());
+        OgnlContext context = (OgnlContext) Ognl.createDefaultContext( null );
+        context.setRoot( root );
+        context.setCurrentObject( root );
+        context.setCurrentType( Integer.TYPE );
+
+        assertEquals( ".get(0)", pa.getSourceAccessor( context, root.getList(), "0" ) );
+
+        assertEquals( List.class, context.getCurrentAccessor() );
+        assertEquals( Object.class, context.getCurrentType() );
+        assertEquals( Integer.TYPE, context.getPreviousType() );
+        assertEquals( null, context.getPreviousAccessor() );
     }
 
     public void test_Get_Source_Object_Number_Index()
@@ -60,33 +62,34 @@ public class ListPropertyAccessorTest ex
 
         Root root = new Root();
 
-        OgnlContext context = (OgnlContext) Ognl.createDefaultContext(null);
-        context.setRoot(root);
-        context.setCurrentObject(root);
-        context.setCurrentType(Integer.class);
-
-        assertEquals(".get(indexValue.intValue())", pa.getSourceAccessor(context, root.getList(), "indexValue"));
-
-        assertEquals(List.class, context.getCurrentAccessor());
-        assertEquals(Object.class, context.getCurrentType());
-        assertEquals(Integer.class, context.getPreviousType());
-        assertEquals(null, context.getPreviousAccessor());
+        OgnlContext context = (OgnlContext) Ognl.createDefaultContext( null );
+        context.setRoot( root );
+        context.setCurrentObject( root );
+        context.setCurrentType( Integer.class );
+
+        assertEquals( ".get(indexValue.intValue())", pa.getSourceAccessor( context, root.getList(), "indexValue" ) );
+
+        assertEquals( List.class, context.getCurrentAccessor() );
+        assertEquals( Object.class, context.getCurrentType() );
+        assertEquals( Integer.class, context.getPreviousType() );
+        assertEquals( null, context.getPreviousAccessor() );
     }
 
-    public void test_List_To_Object_Property_Accessor_Read() throws Exception
+    public void test_List_To_Object_Property_Accessor_Read()
+        throws Exception
     {
         ListPropertyAccessor pa = new ListPropertyAccessor();
-        
+
         ListSource list = new ListSourceImpl();
 
-        OgnlContext context = (OgnlContext) Ognl.createDefaultContext(null);
-        context.setRoot(list);
-        context.setCurrentObject(list);
-
-        assertEquals(".getTotal()", pa.getSourceAccessor(context, list, "total"));
-
-        assertNull(context.get(ExpressionCompiler.PRE_CAST));
-        assertEquals(int.class, context.getCurrentType());
-        assertEquals(ListSource.class, context.getCurrentAccessor());
-   }
+        OgnlContext context = (OgnlContext) Ognl.createDefaultContext( null );
+        context.setRoot( list );
+        context.setCurrentObject( list );
+
+        assertEquals( ".getTotal()", pa.getSourceAccessor( context, list, "total" ) );
+
+        assertNull( context.get( ExpressionCompiler.PRE_CAST ) );
+        assertEquals( int.class, context.getCurrentType() );
+        assertEquals( ListSource.class, context.getCurrentAccessor() );
+    }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/enhance/TestExpressionCompiler.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/enhance/TestExpressionCompiler.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/enhance/TestExpressionCompiler.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/enhance/TestExpressionCompiler.java Sat May 14 13:18:29 2011
@@ -34,14 +34,15 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 
-
 /**
  * Tests functionality of {@link ExpressionCompiler}.
  */
-public class TestExpressionCompiler extends TestCase
+public class TestExpressionCompiler
+    extends TestCase
 {
     OgnlExpressionCompiler _compiler;
-    OgnlContext _context = (OgnlContext) Ognl.createDefaultContext(null);
+
+    OgnlContext _context = (OgnlContext) Ognl.createDefaultContext( null );
 
     public void setUp()
     {
@@ -49,126 +50,126 @@ public class TestExpressionCompiler exte
     }
 
     public void test_Get_Property_Access()
-            throws Throwable
+        throws Throwable
     {
-        Node expr = (Node)Ognl.parseExpression("bean2");
+        Node expr = (Node) Ognl.parseExpression( "bean2" );
         Bean1 root = new Bean1();
 
-        _compiler.compileExpression(_context, expr, root);
+        _compiler.compileExpression( _context, expr, root );
 
-        assertNotNull(expr.getAccessor().get(_context, root));
+        assertNotNull( expr.getAccessor().get( _context, root ) );
     }
 
     public void test_Get_Indexed_Property()
-            throws Throwable
+        throws Throwable
     {
-        Node expr = (Node)Ognl.parseExpression("bean2.bean3.indexedValue[25]");
+        Node expr = (Node) Ognl.parseExpression( "bean2.bean3.indexedValue[25]" );
         Bean1 root = new Bean1();
 
-        assertNull(Ognl.getValue(expr, _context, root));
+        assertNull( Ognl.getValue( expr, _context, root ) );
 
-        _compiler.compileExpression(_context, expr, root);
+        _compiler.compileExpression( _context, expr, root );
 
-        assertNull(expr.getAccessor().get(_context, root));
+        assertNull( expr.getAccessor().get( _context, root ) );
     }
 
     public void test_Set_Indexed_Property()
-            throws Throwable
+        throws Throwable
     {
-        Node expr = (Node)Ognl.parseExpression("bean2.bean3.indexedValue[25]");
+        Node expr = (Node) Ognl.parseExpression( "bean2.bean3.indexedValue[25]" );
         Bean1 root = new Bean1();
 
-        assertNull(Ognl.getValue(expr, _context, root));
+        assertNull( Ognl.getValue( expr, _context, root ) );
 
-        _compiler.compileExpression(_context, expr, root);
+        _compiler.compileExpression( _context, expr, root );
 
-        expr.getAccessor().set(_context, root, "test string");
+        expr.getAccessor().set( _context, root, "test string" );
 
-        assertEquals("test string", expr.getAccessor().get(_context, root));
+        assertEquals( "test string", expr.getAccessor().get( _context, root ) );
     }
 
     public void test_Expression()
-            throws Throwable
+        throws Throwable
     {
-        Node expr = (Node)Ognl.parseExpression("bean2.bean3.value <= 24");
+        Node expr = (Node) Ognl.parseExpression( "bean2.bean3.value <= 24" );
         Bean1 root = new Bean1();
 
-        assertEquals(Boolean.FALSE, Ognl.getValue(expr, _context, root));
+        assertEquals( Boolean.FALSE, Ognl.getValue( expr, _context, root ) );
 
-        _compiler.compileExpression(_context, expr, root);
+        _compiler.compileExpression( _context, expr, root );
 
-        assertEquals(Boolean.FALSE, expr.getAccessor().get(_context, root));
+        assertEquals( Boolean.FALSE, expr.getAccessor().get( _context, root ) );
     }
 
     public void test_Get_Context_Property()
-            throws Throwable
+        throws Throwable
     {
-        _context.put("key", "foo");
-        Node expr = (Node)Ognl.parseExpression("bean2.bean3.map[#key]");
+        _context.put( "key", "foo" );
+        Node expr = (Node) Ognl.parseExpression( "bean2.bean3.map[#key]" );
         Bean1 root = new Bean1();
 
-        assertEquals("bar", Ognl.getValue(expr, _context, root));
+        assertEquals( "bar", Ognl.getValue( expr, _context, root ) );
 
-        _compiler.compileExpression(_context, expr, root);
+        _compiler.compileExpression( _context, expr, root );
 
-        assertEquals("bar", expr.getAccessor().get(_context, root));
+        assertEquals( "bar", expr.getAccessor().get( _context, root ) );
 
-        _context.put("key", "bar");
+        _context.put( "key", "bar" );
 
-        assertEquals("baz", Ognl.getValue(expr, _context, root));
-        assertEquals("baz", expr.getAccessor().get(_context, root));
+        assertEquals( "baz", Ognl.getValue( expr, _context, root ) );
+        assertEquals( "baz", expr.getAccessor().get( _context, root ) );
     }
-    
+
     public void test_Set_Context_Property()
-            throws Throwable
+        throws Throwable
     {
-        _context.put("key", "foo");
-        Node expr = (Node)Ognl.parseExpression("bean2.bean3.map[#key]");
+        _context.put( "key", "foo" );
+        Node expr = (Node) Ognl.parseExpression( "bean2.bean3.map[#key]" );
         Bean1 root = new Bean1();
 
-        _compiler.compileExpression(_context, expr, root);
+        _compiler.compileExpression( _context, expr, root );
 
-        assertEquals("bar", expr.getAccessor().get(_context, root));
+        assertEquals( "bar", expr.getAccessor().get( _context, root ) );
 
-        _context.put("key", "bar");
-        assertEquals("baz", expr.getAccessor().get(_context, root));
+        _context.put( "key", "bar" );
+        assertEquals( "baz", expr.getAccessor().get( _context, root ) );
 
-        expr.getAccessor().set(_context, root, "bam");
-        assertEquals("bam", expr.getAccessor().get(_context, root));
+        expr.getAccessor().set( _context, root, "bam" );
+        assertEquals( "bam", expr.getAccessor().get( _context, root ) );
     }
 
     public void test_Property_Index()
-            throws Throwable
+        throws Throwable
     {
         Root root = new Root();
-        Node expr = (Node) Ognl.compileExpression(_context, root, "{index + 1}");
+        Node expr = (Node) Ognl.compileExpression( _context, root, "{index + 1}" );
 
-        Object ret = expr.getAccessor().get(_context, root);
+        Object ret = expr.getAccessor().get( _context, root );
 
-        assertTrue(Collection.class.isInstance(ret));
+        assertTrue( Collection.class.isInstance( ret ) );
     }
 
     public void test_Root_Expression_Inheritance()
-            throws Throwable
+        throws Throwable
     {
         Inherited obj1 = new TestInherited1();
         Inherited obj2 = new TestInherited2();
 
-        Node expr = (Node) Ognl.compileExpression(_context, obj1, "myString");
+        Node expr = (Node) Ognl.compileExpression( _context, obj1, "myString" );
 
-        assertEquals(expr.getAccessor().get(_context, obj1), "inherited1");
-        assertEquals(expr.getAccessor().get(_context, obj2), "inherited2");
+        assertEquals( expr.getAccessor().get( _context, obj1 ), "inherited1" );
+        assertEquals( expr.getAccessor().get( _context, obj2 ), "inherited2" );
     }
 
     public void test_Create_Empty_Collection()
-            throws Throwable
+        throws Throwable
     {
-        Node expr = (Node) Ognl.compileExpression(_context, null, "{}");
+        Node expr = (Node) Ognl.compileExpression( _context, null, "{}" );
 
-        Object ret = expr.getAccessor().get(_context, null);
+        Object ret = expr.getAccessor().get( _context, null );
 
-        assertNotNull(ret);
-        assertTrue(Collection.class.isAssignableFrom(ret.getClass()));
+        assertNotNull( ret );
+        assertTrue( Collection.class.isAssignableFrom( ret.getClass() ) );
     }
 
     public String getKey()
@@ -177,16 +178,16 @@ public class TestExpressionCompiler exte
     }
 
     public void test_Indexed_Property()
-            throws Throwable
+        throws Throwable
     {
         Map map = new HashMap();
-        map.put("key", "value");
+        map.put( "key", "value" );
 
-        Node expression = Ognl.compileExpression(_context, this, "key");
-        assertEquals("key", expression.getAccessor().get(_context, this));
+        Node expression = Ognl.compileExpression( _context, this, "key" );
+        assertEquals( "key", expression.getAccessor().get( _context, this ) );
     }
 
-    IndexedMapObject mapObject = new IndexedMapObject("propertyValue");
+    IndexedMapObject mapObject = new IndexedMapObject( "propertyValue" );
 
     public IndexedMapObject getObject()
     {
@@ -199,32 +200,33 @@ public class TestExpressionCompiler exte
     }
 
     public void test_Indexed_Map_Property()
-            throws Throwable
+        throws Throwable
     {
-        assertEquals("propertyValue", Ognl.getValue("object[propertyKey]", this));
+        assertEquals( "propertyValue", Ognl.getValue( "object[propertyKey]", this ) );
 
         _context.clear();
-        Node expression = Ognl.compileExpression(_context, this, "object[#this.propertyKey]");
-        assertEquals("propertyValue", expression.getAccessor().get(_context, this));
+        Node expression = Ognl.compileExpression( _context, this, "object[#this.propertyKey]" );
+        assertEquals( "propertyValue", expression.getAccessor().get( _context, this ) );
 
         _context.clear();
-        expression = Ognl.compileExpression(_context, this, "object[propertyKey]");
-        assertEquals("propertyValue", expression.getAccessor().get(_context, this));
+        expression = Ognl.compileExpression( _context, this, "object[propertyKey]" );
+        assertEquals( "propertyValue", expression.getAccessor().get( _context, this ) );
     }
 
-    public void test_Set_Generic_Property() throws Exception
+    public void test_Set_Generic_Property()
+        throws Exception
     {
         _context.clear();
-        
+
         GenericRoot root = new GenericRoot();
 
-        Node node = Ognl.compileExpression(_context, root, "cracker.param");
-        assertEquals(null, node.getAccessor().get(_context, root));
+        Node node = Ognl.compileExpression( _context, root, "cracker.param" );
+        assertEquals( null, node.getAccessor().get( _context, root ) );
 
-        node.getAccessor().set(_context, root, new Integer(0));
-        assertEquals(new Integer(0), node.getAccessor().get(_context, root));
+        node.getAccessor().set( _context, root, new Integer( 0 ) );
+        assertEquals( new Integer( 0 ), node.getAccessor().get( _context, root ) );
 
-        node.getAccessor().set(_context, root, new Integer(12));
-        assertEquals(new Integer(12), node.getAccessor().get(_context, root));
+        node.getAccessor().set( _context, root, new Integer( 12 ) );
+        assertEquals( new Integer( 12 ), node.getAccessor().get( _context, root ) );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseBean.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseBean.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseBean.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseBean.java Sat May 14 13:18:29 2011
@@ -22,11 +22,11 @@
  */
 package org.apache.commons.ognl.test.objects;
 
-
 /**
  * Base class used to test inheritance class casting.
  */
-public abstract class BaseBean {
+public abstract class BaseBean
+{
 
     public abstract String getName();
 
@@ -45,12 +45,12 @@ public abstract class BaseBean {
         return new Two();
     }
 
-    public String getMessage(String mes)
+    public String getMessage( String mes )
     {
         return "[" + mes + "]";
     }
 
-    public boolean hasChildren(String name)
+    public boolean hasChildren( String name )
     {
         return name.length() > 2;
     }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseGeneric.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseGeneric.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseGeneric.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseGeneric.java Sat May 14 13:18:29 2011
@@ -24,10 +24,13 @@ import java.io.Serializable;
 /**
  * Used to test ognl handling of java generics.
  */
-public class BaseGeneric<E extends GenericObject, I extends Serializable> {
+public class BaseGeneric<E extends GenericObject, I extends Serializable>
+{
 
     E _value;
+
     GenericService _service;
+
     protected I[] ids;
 
     public BaseGeneric()
@@ -35,7 +38,7 @@ public class BaseGeneric<E extends Gener
         _service = new GenericServiceImpl();
     }
 
-    public void setIds(I[] ids)
+    public void setIds( I[] ids )
     {
         this.ids = ids;
     }
@@ -60,7 +63,7 @@ public class BaseGeneric<E extends Gener
         return _service;
     }
 
-    public String format(Object value)
+    public String format( Object value )
     {
         return value.toString();
     }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseIndexed.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseIndexed.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseIndexed.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseIndexed.java Sat May 14 13:18:29 2011
@@ -22,9 +22,10 @@ package org.apache.commons.ognl.test.obj
 /**
  * Class used to test inheritance.
  */
-public class BaseIndexed {
+public class BaseIndexed
+{
 
-    public Object getLine(int index)
+    public Object getLine( int index )
     {
         return "line:" + index;
     }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseObjectIndexed.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseObjectIndexed.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseObjectIndexed.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseObjectIndexed.java Sat May 14 13:18:29 2011
@@ -21,9 +21,10 @@ package org.apache.commons.ognl.test.obj
 
 import java.util.*;
 
-public class BaseObjectIndexed extends Object
+public class BaseObjectIndexed
+    extends Object
 {
-    private Map     attributes = new HashMap();
+    private Map attributes = new HashMap();
 
     public BaseObjectIndexed()
     {
@@ -35,31 +36,30 @@ public class BaseObjectIndexed extends O
         return attributes;
     }
 
-    public Object getAttribute(String name)
+    public Object getAttribute( String name )
     {
-        return attributes.get(name);
+        return attributes.get( name );
     }
 
-    public void setAttribute(String name, Object value)
+    public void setAttribute( String name, Object value )
     {
-        attributes.put(name, value);
+        attributes.put( name, value );
     }
 
     /* allow testing property name where types do not match */
-    public Object getOtherAttribute(String name)
+    public Object getOtherAttribute( String name )
     {
         return null;
     }
 
-    public void setOtherAttribute(Object someObject, Object foo)
+    public void setOtherAttribute( Object someObject, Object foo )
     {
         /* do nothing */
     }
 
-
     /* test whether get only is found */
-    public Object getSecondaryAttribute(Object name)
+    public Object getSecondaryAttribute( Object name )
     {
-        return attributes.get(name);
+        return attributes.get( name );
     }
 }

Modified: incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseSyntheticObject.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseSyntheticObject.java?rev=1103095&r1=1103094&r2=1103095&view=diff
==============================================================================
--- incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseSyntheticObject.java (original)
+++ incubator/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/BaseSyntheticObject.java Sat May 14 13:18:29 2011
@@ -25,7 +25,8 @@ import java.util.List;
 /**
  * Used to test OGNL-136 use of synthetic methods.
  */
-public abstract class BaseSyntheticObject {
+public abstract class BaseSyntheticObject
+{
 
     protected List getList()
     {



Mime
View raw message