Commits

jkuh...@d4b077e3-5828-0410-b394-cb2b42183085  committed 6770a88

Fixes OGNL-17. ...Too much to list, the summary is that ASTCtor / ASTList hadn't had the same kind of context/ refactoring love
that ASTMethod/ property/ etc had ....

  • Participants
  • Parent commits f2bc583

Comments (0)

Files changed (16)

   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTOr.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTOr.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Messages.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/ASTPropertyTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/ASTPropertyTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/StaticsAndConstructorsTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/StaticsAndConstructorsTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/OgnlTestCase.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/OgnlTestCase.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayElementsTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayElementsTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/PrimitiveArrayTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/PrimitiveArrayTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTList.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTList.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTCtor.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTCtor.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/enhance/ExpressionCompiler.java" afterPath="$PROJECT_DIR$/src/java/ognl/enhance/ExpressionCompiler.java" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OGNL.iws" afterPath="$PROJECT_DIR$/OGNL.iws" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/SimpleNavigationChainTreeTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/SimpleNavigationChainTreeTest.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/MenuItem.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayCreationTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayCreationTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTMethod.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTMethod.java" />
     </list>
   </component>
   <component name="ChangesViewManager" flattened_view="true" />
     </subPane>
   </component>
   <component name="FileEditorManager">
-    <leaf>
-      <file leaf-file-name="PropertyTest.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="44" column="0" selection-start="2048" selection-end="2048" vertical-scroll-proportion="-0.12776831">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ExpressionCompiler.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/java/ognl/enhance/ExpressionCompiler.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="218" column="10" selection-start="8522" selection-end="8522" vertical-scroll-proportion="-0.14735946">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ASTOr.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTOr.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="100" column="12" selection-start="3738" selection-end="3738" vertical-scroll-proportion="0.2810903">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ASTAnd.java" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAnd.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="125" column="22" selection-start="4490" selection-end="4490" vertical-scroll-proportion="0.5621806">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Root.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="59" column="0" selection-start="3096" selection-end="3096" vertical-scroll-proportion="0.35775128">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-    </leaf>
+    <leaf />
   </component>
   <component name="FindManager">
     <FindUsagesManager>
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
         </PATH_ELEMENT>
       </PATH>
-      <PATH>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL.ipr" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-      </PATH>
-      <PATH>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL.ipr" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/ognl/test" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-      </PATH>
-      <PATH>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL.ipr" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-      </PATH>
     </subPane>
   </component>
   <component name="ProjectReloadState">
       <showLibraryContents />
       <hideEmptyPackages />
       <abbreviatePackageNames />
-      <showStructure Favorites="false" PackagesPane="false" Scope="false" ProjectPane="false" />
+      <showStructure Scope="false" ProjectPane="false" PackagesPane="false" Favorites="false" />
       <autoscrollToSource />
       <autoscrollFromSource />
       <sortByType />
     <option name="SHOW_DIALOG" value="true" />
   </component>
   <component name="RecentsManager" />
-  <component name="RestoreUpdateTree">
-    <UpdateInfo date="3/21/07 7:07 PM" ActionInfo="_Update">
-      <UpdatedFiles>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Updated from server" />
-          <option name="myStatusName" value="Changed on server" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="CHANGED_ON_SERVER" />
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Updated" />
-            <option name="myStatusName" value="Changed" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="false" />
-            <option name="myId" value="UPDATED" />
-          </FILE-GROUP>
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Created" />
-            <option name="myStatusName" value="Created" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="false" />
-            <option name="myId" value="CREATED" />
-          </FILE-GROUP>
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Deleted" />
-            <option name="myStatusName" value="Deleted" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="true" />
-            <option name="myId" value="REMOVED_FROM_REPOSITORY" />
-          </FILE-GROUP>
-          <FILE-GROUP>
-            <option name="myUpdateName" value="Restored" />
-            <option name="myStatusName" value="Will be restored" />
-            <option name="mySupportsDeletion" value="false" />
-            <option name="myCanBeAbsent" value="false" />
-            <option name="myId" value="RESTORED" />
-          </FILE-GROUP>
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Modified" />
-          <option name="myStatusName" value="Modified" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="MODIFIED" />
-          <PATH>$PROJECT_DIR$/OGNL.iws</PATH>
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Skipped" />
-          <option name="myStatusName" value="Skipped" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="SKIPPED" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Merged with conflicts" />
-          <option name="myStatusName" value="Will be merged with conflicts" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="MERGED_WITH_CONFLICTS" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Merged" />
-          <option name="myStatusName" value="Will be merged" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="MERGED" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Not in repository" />
-          <option name="myStatusName" value="Not in repository" />
-          <option name="mySupportsDeletion" value="true" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="UNKNOWN" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Locally added" />
-          <option name="myStatusName" value="Locally added" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="LOCALLY_ADDED" />
-        </FILE-GROUP>
-        <FILE-GROUP>
-          <option name="myUpdateName" value="Locally removed" />
-          <option name="myStatusName" value="Locally removed" />
-          <option name="mySupportsDeletion" value="false" />
-          <option name="myCanBeAbsent" value="false" />
-          <option name="myId" value="LOCALLY_REMOVED" />
-        </FILE-GROUP>
-      </UpdatedFiles>
-    </UpdateInfo>
-  </component>
-  <component name="RunManager" selected="JUnit.PropertyTest">
-    <tempConfiguration default="false" name="PropertyTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+  <component name="RestoreUpdateTree" />
+  <component name="RunManager" selected="JUnit.ASTPropertyTest">
+    <tempConfiguration default="false" name="ASTPropertyTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <pattern value="org.ognl.test.*" />
       <module name="OGNL" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <option name="ALTERNATIVE_JRE_PATH" />
       <option name="PACKAGE_NAME" value="org.ognl.test" />
-      <option name="MAIN_CLASS_NAME" value="org.ognl.test.PropertyTest" />
+      <option name="MAIN_CLASS_NAME" value="org.ognl.test.ASTPropertyTest" />
       <option name="METHOD_NAME" />
       <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" />
         <option name="Make" value="true" />
       </method>
     </configuration>
-    <configuration default="true" type="Applet" factoryName="Applet">
-      <module name="" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="HTML_FILE_NAME" />
-      <option name="HTML_USED" value="false" />
-      <option name="WIDTH" value="400" />
-      <option name="HEIGHT" value="300" />
-      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
-      <option name="VM_PARAMETERS" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-    </configuration>
     <configuration default="true" type="Remote" factoryName="Remote">
       <option name="USE_SOCKET_TRANSPORT" value="true" />
       <option name="SERVER_MODE" value="false" />
         <option name="Make" value="true" />
       </method>
     </configuration>
+    <configuration default="true" type="Applet" factoryName="Applet">
+      <module name="" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+    </configuration>
     <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Remote">
       <option name="WORKING_DIRECTORY" />
       <option name="HOST" value="localhost" />
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="95" y="133" width="2112" height="1362" extended-state="0" />
+    <frame x="115" y="145" width="2112" height="1362" extended-state="0" />
     <editor active="false" />
     <layout>
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32912457" order="1" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2755187" order="3" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24046434" order="8" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2307054" order="8" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22323652" order="8" />
       <window_info id="Maven" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
       <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
-      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.21616359" order="0" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22103213" order="0" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
       <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25975105" order="2" />
     <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
     <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
-    <option name="LAST_COMMIT_MESSAGE" value="Minor code formatting / cleanup." />
+    <option name="LAST_COMMIT_MESSAGE" value="Fixes OGNL-17. ...Too much to list, the summary is that ASTCtor / ASTList hadn't had the same kind of context/ refactoring love &#10;that ASTMethod/ property/ etc had ...." />
     <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
     <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
     <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
     <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
-    <MESSAGE value="Added missing jar dependencies." />
-    <MESSAGE value="Added new test case for OGNL-10, stil not able to re-produce though." />
     <MESSAGE value="Fixes OGNL-9. ASTMethod wasn't handling the case where the incoming value being passed as a param was a primitive. Simplified logic by using the javassist widening conversion variable cast." />
     <MESSAGE value="Added svn:ignores for build/target/etc.." />
     <MESSAGE value="Added another static reference test for OGNL-12. Wasn't able to re-produce but will keep the test anyways &quot;just in case&quot;." />
     <MESSAGE value="F#@$#$1! ...........Static references had bug in ASTChain with setting the special &quot;noRoot&quot; flag (hack) on static fields when the astchain was contained by another expression." />
     <MESSAGE value="ASTMethods weren't handling the case where a parameter value might be a literal &quot;null&quot; when handing objects off for conversion to OgnlOps.covnertValue." />
     <MESSAGE value="Minor code formatting / cleanup." />
+    <MESSAGE value="Partially fixes OGNL-17 . It's only partial because someone tried to sneak in two different tickets under one." />
+    <MESSAGE value="Fixes OGNL-17. ...Too much to list, the summary is that ASTCtor / ASTList hadn't had the same kind of context/ refactoring love &#10;that ASTMethod/ property/ etc had ...." />
   </component>
   <component name="antWorkspaceConfiguration">
     <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
     <option name="myLastEditedConfigurable" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/NoSuchPropertyException.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/OgnlTestCase.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="65" column="12" selection-start="2655" selection-end="2655" vertical-scroll-proportion="0.6323185">
+        <state line="179" column="0" selection-start="6941" selection-end="6941" vertical-scroll-proportion="0.5081967">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/OgnlTestCase.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayElementsTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="181" column="4" selection-start="7002" selection-end="7002" vertical-scroll-proportion="0.36115843">
+        <state line="62" column="6" selection-start="3100" selection-end="3100" vertical-scroll-proportion="0.31942078">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTProperty.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/MethodWithConversionTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="372" column="13" selection-start="16026" selection-end="16026" vertical-scroll-proportion="0.40800682">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ObjectPropertyAccessor.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="270" column="0" selection-start="9969" selection-end="9969" vertical-scroll-proportion="0.923339">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/SetterTest.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="74" column="0" selection-start="3877" selection-end="3877" vertical-scroll-proportion="0.33560476">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlOps.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="596" column="12" selection-start="22373" selection-end="22373" vertical-scroll-proportion="0.4846678">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/LambdaExpressionTest.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="51" column="6" selection-start="2773" selection-end="2773" vertical-scroll-proportion="0.22998296">
+        <state line="50" column="6" selection-start="2455" selection-end="2455" vertical-scroll-proportion="0.25553662">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ArithmeticAndLogicalOperatorsTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="124" column="0" selection-start="5469" selection-end="5469" vertical-scroll-proportion="0.4471891">
+        <state line="168" column="47" selection-start="7360" selection-end="7360" vertical-scroll-proportion="0.6260647">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Simple.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="59" column="0" selection-start="3096" selection-end="3096" vertical-scroll-proportion="0.35775128">
+        <state line="72" column="0" selection-start="2569" selection-end="2569" vertical-scroll-proportion="0.38641685">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/pom.xml">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayCreationTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="49" column="24" selection-start="1571" selection-end="1571" vertical-scroll-proportion="0.5257611">
+        <state line="60" column="6" selection-start="3196" selection-end="3196" vertical-scroll-proportion="0.35775128">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTMethod.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="223" column="79" selection-start="7561" selection-end="7782" vertical-scroll-proportion="0.6498829">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="2254" column="9" selection-start="86509" selection-end="86509" vertical-scroll-proportion="0.96487117">
+        <state line="1943" column="0" selection-start="74117" selection-end="74117" vertical-scroll-proportion="0.25526932">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTOr.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/StaticsAndConstructorsTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="100" column="12" selection-start="3738" selection-end="3738" vertical-scroll-proportion="0.2810903">
+        <state line="43" column="12" selection-start="2102" selection-end="2102" vertical-scroll-proportion="0.15332198">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="44" column="0" selection-start="2048" selection-end="2048" vertical-scroll-proportion="-0.12776831">
+        <state line="96" column="163" selection-start="6114" selection-end="6114" vertical-scroll-proportion="0.6516184">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/PrimitiveArrayTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="40" column="12" selection-start="2033" selection-end="2033" vertical-scroll-proportion="0.12776831">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTCtor.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="241" column="25" selection-start="9233" selection-end="9233" vertical-scroll-proportion="2.0860307">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTList.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="182" column="35" selection-start="6754" selection-end="6754" vertical-scroll-proportion="0.93611586">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/java/ognl/enhance/ExpressionCompiler.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="218" column="10" selection-start="8522" selection-end="8522" vertical-scroll-proportion="-0.14735946">
+        <state line="385" column="0" selection-start="14730" selection-end="14730" vertical-scroll-proportion="0.42078364">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAnd.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ASTPropertyTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="125" column="22" selection-start="4490" selection-end="4490" vertical-scroll-proportion="0.5621806">
+        <state line="50" column="8" selection-start="1490" selection-end="1490" vertical-scroll-proportion="0.57495743">
           <folding />
         </state>
       </provider>

File src/java/ognl/ASTCtor.java

         isArray = value;
     }
 
+    public boolean isArray()
+    {
+        return isArray;
+    }
+
     protected Object getValueBody(OgnlContext context, Object source)
             throws OgnlException
     {
         try {
 
             clazz = OgnlRuntime.classForName(context, className);
-
-            context.put("_ctorClass", clazz);
-
+            
             Object value = this.getValueBody(context, target);
             context.setCurrentObject(value);
-
+            
             if (clazz != null) {
-
+                
                 context.setCurrentType(clazz);
                 context.setCurrentAccessor(clazz);
             }
 
+            if (isArray)
+                context.put("_ctorClass", clazz);
+
         } catch (Throwable t) {
             if (UnsupportedCompilationException.class.isInstance(t))
                 throw (UnsupportedCompilationException)t;
                 result = result + "(";
 
                 if ((_children != null) && (_children.length > 0)) {
+
+                    
                     for(int i = 0; i < _children.length; i++) {
                         if (i > 0) {
                             result = result + ", ";
                         }
-
+                        
                         Object objValue = _children[i].getValue(context, context.getRoot());
                         String value = _children[i].toGetSourceString(context, target);
+                        
+                        value = ExpressionCompiler.getRootExpression(_children[i], target, false) + value;
 
-                        if (className.equals("String") && !value.startsWith("\""))
-                            value = "\"" + value + "\"";
-                        else if (NodeType.class.isInstance(_children[i])) {
-                            NodeType ctype = (NodeType)_children[i];
+                        // System.out.println("astctor child class: " + _children[i].getClass() + " value: " + value);
 
-                            if (ctype.getGetterClass() != null && String.class == ctype.getGetterClass() && !value.startsWith("\""))
-                                value = "\"" + value + "\"";
+                        String cast = "";
+                        if (ExpressionCompiler.shouldCast(_children[i])) {
+
+                            cast = (String)context.remove(ExpressionCompiler.PRE_CAST);
+                        }
+                        if (cast == null)
+                            cast = "";
+
+                        if (!ASTConst.class.isInstance(_children[i]))
+                            value = cast + value;
+                        
+                        if (ASTConst.class.isInstance(_children[i]) && Number.class.isAssignableFrom(context.getCurrentType())) {
+                            
+                            value += OgnlRuntime.getNumericLiteral(context.getCurrentType());
+                        } else if (objValue != null && !objValue.getClass().isPrimitive()
+                                   && !objValue.getClass().isArray() && !ASTConst.class.isInstance(_children[i])) {
+
+                            value = "(" + OgnlRuntime.getCompiler().getInterfaceClass(objValue.getClass()).getName() + ")" + value;
+                        } else {
+
+                            value = " ($w) " + value;
                         }
 
-                        value = ExpressionCompiler.getRootExpression(_children[0], target, false) + value;
-
-                        if (context.get(ExpressionCompiler.PRE_CAST) != null) {
-                            value = context.remove(ExpressionCompiler.PRE_CAST) + value;
-                        }
-                        
-                        if (objValue != null && !objValue.getClass().isPrimitive() && !ASTConst.class.isInstance(_children[i])) {
-
-                            value = "(" + ExpressionCompiler.getCastString(objValue.getClass()) + ")" + value;
-                        }
-                        
-                        if (ASTConst.class.isInstance(_children[i]) &&  Number.class.isAssignableFrom(context.getCurrentType())) {
-                            
-                            value += OgnlRuntime.getNumericLiteral(context.getCurrentType());
-                        }
-                        
                         result += value;
                     }
                 }
                 result = result + ")";
             }
 
-            context.remove("_ctorClass");
+            context.setCurrentType(clazz);
+            context.setCurrentAccessor(clazz);
+            context.setCurrentObject(getValue(context, target));
 
-            context.setCurrentType(clazz);
-
-            context.setCurrentObject(getValue(context, target));
         }catch (Throwable t) {
             if (UnsupportedCompilationException.class.isInstance(t))
                 throw (UnsupportedCompilationException)t;
                 throw new RuntimeException(t);
         }
 
+        context.remove("_ctorClass");
+
         return result;
     }
 

File src/java/ognl/ASTList.java

     public String toGetSourceString(OgnlContext context, Object target)
     {
         String result = "";
-        Class mainClass = null;
-        
-        if (_parent == null || !ASTCtor.class.isInstance(_parent)) {
+        boolean array = false;
+
+        if (_parent != null && ASTCtor.class.isInstance(_parent)
+                && ((ASTCtor)_parent).isArray()) {
+
+            array = true;
+        }
+
+        if (!array) {
+
             result += "java.util.Arrays.asList( new Object[] ";
-            _getterClass = List.class;
-        } else {
-            
-            mainClass = (Class)context.get("_ctorClass");
-            _getterClass = mainClass;
         }
         
+        context.setCurrentType(List.class);
+        context.setCurrentAccessor(List.class);
+        
         result += "{ ";
+
+        try {
+
+            for(int i = 0; i < jjtGetNumChildren(); ++i) {
+                if (i > 0) {
+                    result = result + ", ";
+                }
+
+                Class prevType = context.getCurrentType();
+
+                Object objValue = _children[i].getValue(context, context.getRoot());
+                String value = _children[i].toGetSourceString(context, target);
+
+                // to undo type setting of constants when used as method parameters
+                if (ASTConst.class.isInstance(_children[i])) {
+
+                    context.setCurrentType(prevType);
+                }
+
+                value = ExpressionCompiler.getRootExpression(_children[i], target, false) + value;
+
+                String cast = "";
+                if (ExpressionCompiler.shouldCast(_children[i])) {
+
+                    cast = (String)context.remove(ExpressionCompiler.PRE_CAST);
+                }
+                if (cast == null)
+                    cast = "";
+
+                if (!ASTConst.class.isInstance(_children[i]))
+                    value = cast + value;
+
+                Class ctorClass = (Class)context.get("_ctorClass");
+                if (array && ctorClass != null && !ctorClass.isPrimitive()) {
+
+                    Class valueClass = value != null ? value.getClass() : null;
+                    if (NodeType.class.isAssignableFrom(_children[i].getClass()))
+                        valueClass = ((NodeType)_children[i]).getGetterClass();
+
+                    if (valueClass != null && ctorClass.isArray()) {
+
+                        value = "(" + ExpressionCompiler.getCastString(ctorClass)
+                                + ")ognl.OgnlOps.toArray(" + value + ", " + ctorClass.getComponentType().getName()
+                                + ".class, true)";
+
+                    } else  if (ctorClass.isPrimitive()) {
+
+                        Class wrapClass = OgnlRuntime.getPrimitiveWrapperClass(ctorClass);
+
+                        value = "((" + wrapClass.getName()
+                                + ")ognl.OgnlOps.convertValue(" + value + ","
+                                + wrapClass.getName() + ".class, true))."
+                                + OgnlRuntime.getNumericValueGetter(wrapClass);
+                        
+                    } else if (ctorClass != Object.class) {
+
+                        value = "(" + ctorClass.getName() + ")ognl.OgnlOps.convertValue(" + value + "," + ctorClass.getName() + ".class)";
+                    } else if ((NodeType.class.isInstance(_children[i])
+                                && ((NodeType)_children[i]).getGetterClass() != null
+                                && Number.class.isAssignableFrom(((NodeType)_children[i]).getGetterClass()))
+                               || valueClass.isPrimitive()) {
+
+                        value = " ($w) " + value;
+                    } else if (valueClass.isPrimitive()) {
+                        value = "($w) " + value;
+                    }
+                    
+                } else if (ctorClass == null || !ctorClass.isPrimitive()) {
+
+                    value = " ($w) " + value;
+                }
+
+                if (objValue == null || value.length() <= 0)
+                    value = "null";
+                
+                result += value;
+            }
+
+        }catch (Throwable t) {
+            if (UnsupportedCompilationException.class.isInstance(t))
+                throw (UnsupportedCompilationException)t;
+            else
+                throw new RuntimeException(t);
+        }
+
+        context.setCurrentType(List.class);
+        context.setCurrentAccessor(List.class);
         
-        for(int i = 0; i < jjtGetNumChildren(); ++i) {
-            if (i > 0) {
-                result = result + ", ";
-            }
-            
-            String value = _children[i].toGetSourceString(context, target);
-            
-            //System.out.println("astlist child class " + _children[i].getClass().getName() + " and source: " + value + " mainClass: " + mainClass);
-            
-            if (mainClass != null && String.class.isAssignableFrom(mainClass) && !value.startsWith("\"")) {
-                value = "\"" + value + "\"";
-            } else if (_getterClass == List.class && value.startsWith("'")) {
-                value = value.replaceAll("'", "\"");
-            } else if ((ASTProperty.class.isInstance(_children[i]) || ASTMethod.class.isInstance(_children[i])
-                    || ASTSequence.class.isInstance(_children[i]) || ASTChain.class.isInstance(_children[i]))
-                    && value != null && value.trim().length() > 0) {
-                    
-                    String pre = (String)context.get("_currentChain");
-                    if (pre == null)
-                        pre = "";
-                    
-                    String cast = (String)context.remove(ExpressionCompiler.PRE_CAST);
-                    if (cast == null)
-                        cast = "";
-                    
-                    value = cast + ExpressionCompiler.getRootExpression(_children[i], context.getRoot(), false) + pre + value;
-                    
-            } else if (!ASTVarRef.class.isInstance(_children[i]) 
-                    && NodeType.class.isInstance(_children[i])) {
-                
-                NodeType ctype = (NodeType)_children[i];
-                
-                if (mainClass != null && !mainClass.isPrimitive()) {
-                    
-                    value = "new " + mainClass.getName() + "(" + value + ")";
-                } else if (ctype.getGetterClass() != null 
-                        && Number.class.isAssignableFrom(ctype.getGetterClass())
-                        && (mainClass == null || !mainClass.isPrimitive())) {
-                    
-                    value = "new " + ctype.getGetterClass().getName() + "(" + value + ")";
-                } else if (ctype.getGetterClass() != null && String.class == ctype.getGetterClass()
-                        && value != null && !value.startsWith("\"")) {
-                    
-                    value = "\"" + value + "\"";
-                } else if (ctype.getGetterClass() != null 
-                        && (Boolean.class == ctype.getGetterClass() || Boolean.TYPE == ctype.getGetterClass())
-                        && (mainClass == null || !mainClass.isPrimitive())) {
-                    
-                    value = "Boolean.valueOf(" + value + ")";
-                } else if (value == null || value.length() <= 0)
-                    value = "null";
-            }
-            
-            result += value;
-        }
-        
-        context.setCurrentType(_getterClass);
-        
+        /*
         if (_parent == null || !ASTCtor.class.isInstance(_parent))
             return result + " })";
         else
             return result + " }";
+            */
+
+        result += "}";
+
+        if (!array)
+            result += ")";
+        
+        return result;
     }
     
     public String toSetSourceString(OgnlContext context, Object target)

File src/java/ognl/ASTMethod.java

                             + ")ognl.OgnlOps.convertValue(" + parmString + "," 
                             + wrapClass.getName() + ".class, true))."
                             + OgnlRuntime.getNumericValueGetter(wrapClass);
+                            
                         } else if (parms[i] != Object.class) {
+                            
                             parmString = "(" + parms[i].getName() + ")ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)";
                         } else if ((NodeType.class.isInstance(_children[i])
                                 && ((NodeType)_children[i]).getGetterClass() != null 

File src/java/ognl/enhance/ExpressionCompiler.java

                     || ASTStaticField.class.isInstance(expression.jjtGetChild(0)))
                 return false;
         }
-
+        
         return true;
     }
 
     public void compileExpression(OgnlContext context, Node expression, Object root)
     throws Exception
     {
-        //System.out.println("Compiling expr class " + expression.getClass().getName() + " and root " + root);
+        // System.out.println("Compiling expr class " + expression.getClass().getName() + " and root " + root);
         
         if (expression.getAccessor() != null)
             return;

File src/test/java/org/ognl/test/ASTPropertyTest.java

 package org.ognl.test;
 
 import junit.framework.TestCase;
-import ognl.ASTConst;
-import ognl.ASTProperty;
-import ognl.Ognl;
-import ognl.OgnlContext;
+import ognl.*;
 import org.ognl.test.objects.Root;
 
+import java.util.List;
 import java.util.Map;
 
 /**
         assertEquals(null, context.getPreviousType());
         assertEquals(null, context.getPreviousAccessor());
     }
+    
+    public void test_Complicated_List() throws Exception
+    {
+        Root root = new Root();
+        OgnlContext context = (OgnlContext)Ognl.createDefaultContext(null);
+        
+        SimpleNode node = (SimpleNode) Ognl.compileExpression(context, root,
+                "{ new org.ognl.test.objects.MenuItem('Home', 'Main', "
+                    + "{ new org.ognl.test.objects.MenuItem('Help', 'Help'), "
+                    + "new org.ognl.test.objects.MenuItem('Contact', 'Contact') }), " // end first item
+                    + "new org.ognl.test.objects.MenuItem('UserList', getMessages().getMessage('menu.members')), " +
+                    "new org.ognl.test.objects.MenuItem('account/BetSlipList', getMessages().getMessage('menu.account'), " +
+                    "{ new org.ognl.test.objects.MenuItem('account/BetSlipList', 'My Bets'), " +
+                    "new org.ognl.test.objects.MenuItem('account/TransactionList', 'My Transactions') }), " +
+                    "new org.ognl.test.objects.MenuItem('About', 'About'), " +
+                    "new org.ognl.test.objects.MenuItem('admin/Admin', getMessages().getMessage('menu.admin'), " +
+                    "{ new org.ognl.test.objects.MenuItem('admin/AddEvent', 'Add event'), " +
+                    "new org.ognl.test.objects.MenuItem('admin/AddResult', 'Add result') })}");
+        
+        assertTrue(List.class.isAssignableFrom(node.getAccessor().get(context, root).getClass()));
+    }
 }

File src/test/java/org/ognl/test/ArrayCreationTest.java

                     new Simple[] { new Simple(), new Simple("foo", 1.0f, 2) } },
             { ROOT, "new org.ognl.test.objects.Simple[5]", new Simple[5] },
             { ROOT, "new org.ognl.test.objects.Simple(new Object[5])", new Simple(new Object[5]) },
-            { ROOT, "new org.ognl.test.objects.Simple(new String[5])", new Simple(new String[5]) },
+            { ROOT, "new org.ognl.test.objects.Simple(new String[5])", new Simple(new String[5]) } 
     };
 
     /*

File src/test/java/org/ognl/test/ArrayElementsTest.java

 import java.util.Arrays;
 import java.util.Map;
 
-public class ArrayElementsTest extends OgnlTestCase
-{
+public class ArrayElementsTest extends OgnlTestCase {
 
-    private static String[] STRING_ARRAY = new String[] { "hello", "world" };
-    private static int[] INT_ARRAY = new int[] { 10, 20 };
+    private static String[] STRING_ARRAY = new String[]{"hello", "world"};
+    private static int[] INT_ARRAY = new int[]{10, 20};
     private static Root ROOT = new Root();
 
     private static Object[][] TESTS = {
             // Array elements test
-            { STRING_ARRAY, "length", new Integer(2) },
-            { STRING_ARRAY, "#root[1]", "world" },
-            { INT_ARRAY, "#root[1]", new Integer(20) },
-            { INT_ARRAY, "#root[1]", new Integer(20), "50", new Integer(50) },
-            { INT_ARRAY, "#root[1]", new Integer(50), new String[] { "50", "100" }, new Integer(50) },
-            { ROOT, "intValue", new Integer(0), new String[] { "50", "100" }, new Integer(50) },
-            { ROOT, "array", ROOT.getArray(), new String[] { "50", "100" }, new int[] { 50, 100 } },
+            {STRING_ARRAY, "length", new Integer(2)},
+            {STRING_ARRAY, "#root[1]", "world"},
+            {INT_ARRAY, "#root[1]", new Integer(20)},
+            {INT_ARRAY, "#root[1]", new Integer(20), "50", new Integer(50)},
+            {INT_ARRAY, "#root[1]", new Integer(50), new String[]{"50", "100"}, new Integer(50)},
+            {ROOT, "intValue", new Integer(0), new String[]{"50", "100"}, new Integer(50)},
+            {ROOT, "array", ROOT.getArray(), new String[]{"50", "100"}, new int[]{50, 100}},
             {null, "\"{Hello}\".toCharArray()[6]", new Character('}')},
             {null, "\"Tapestry\".toCharArray()[2]", new Character('p')},
-            {null, "{'1','2','3'}", Arrays.asList(new Object[] {"1", "2", "3"})}
+            {null, "{'1','2','3'}", Arrays.asList(new Object[]{ new Character('1'), new Character('2'), new Character('3')})}
     };
 
     /*
     {
         TestSuite result = new TestSuite();
 
-        for(int i = 0; i < TESTS.length; i++) {
+        for (int i = 0; i < TESTS.length; i++) {
             if (TESTS[i].length == 3) {
                 result.addTest(new ArrayElementsTest((String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1],
                         TESTS[i][2]));
         TypeConverter arrayConverter;
 
         super.setUp();
-        arrayConverter = new DefaultTypeConverter()
-        {
+        arrayConverter = new DefaultTypeConverter() {
 
             public Object convertValue(Map context, Object target, Member member, String propertyName, Object value,
                                        Class toType)

File src/test/java/org/ognl/test/OgnlTestCase.java

                 && Character.class.isInstance(actual)) {
             
             TestCase.assertEquals(((Character)expected).charValue(), ((Character)actual).charValue());
-        } else
+        } else {
+
             TestCase.assertEquals(expected, actual);
+        }
     }
     
 	/*===================================================================

File src/test/java/org/ognl/test/PrimitiveArrayTest.java

 import junit.framework.TestSuite;
 import org.ognl.test.objects.Root;
 
-public class PrimitiveArrayTest extends OgnlTestCase
-{
-    private static Root             ROOT = new Root();
+public class PrimitiveArrayTest extends OgnlTestCase {
+    private static Root ROOT = new Root();
 
-    private static Object[][]       TESTS = {
-        // Primitive array creation
-        { ROOT, "new boolean[5]",                   new boolean[5] },
-        { ROOT, "new boolean[] { true, false }",    new boolean[] { true, false } }, 
-        { ROOT, "new boolean[] { 0, 1, 5.5 }",      new boolean[] { false, true, true } },
-        { ROOT, "new char[] { 'a', 'b' }",          new char[] { 'a', 'b' } },
-        { ROOT, "new char[] { 10, 11 }",            new char[] { (char)10, (char)11 } },
-        { ROOT, "new byte[] { 1, 2 }",              new byte[] { 1, 2 } },
-        { ROOT, "new short[] { 1, 2 }",             new short[] { 1, 2 } }, 
-        { ROOT, "new int[six]",                     new int[ROOT.six] },
-        { ROOT, "new int[#root.six]",               new int[ROOT.six] },
-        { ROOT, "new int[6]",                       new int[6] }, 
-        { ROOT, "new int[] { 1, 2 }",               new int[] { 1, 2 } },
-        { ROOT, "new long[] { 1, 2 }",              new long[] { 1, 2 } },
-        { ROOT, "new float[] { 1, 2 }",             new float[] { 1, 2 } },
-        { ROOT, "new double[] { 1, 2 }",            new double[] { 1, 2 } },
+    private static Object[][] TESTS = {
+            // Primitive array creation
+            {ROOT, "new boolean[5]", new boolean[5]},
+            {ROOT, "new boolean[] { true, false }", new boolean[]{true, false}},
+            {ROOT, "new boolean[] { 0, 1, 5.5 }", new boolean[]{false, true, true}},
+            {ROOT, "new char[] { 'a', 'b' }", new char[]{'a', 'b'}},
+            {ROOT, "new char[] { 10, 11 }", new char[]{(char) 10, (char) 11}},
+            {ROOT, "new byte[] { 1, 2 }", new byte[]{1, 2}},
+            {ROOT, "new short[] { 1, 2 }", new short[]{1, 2}},
+            {ROOT, "new int[six]", new int[ROOT.six]},
+            {ROOT, "new int[#root.six]", new int[ROOT.six]},
+            {ROOT, "new int[6]", new int[6]},
+            {ROOT, "new int[] { 1, 2 }", new int[]{1, 2}},
+            {ROOT, "new long[] { 1, 2 }", new long[]{1, 2}},
+            {ROOT, "new float[] { 1, 2 }", new float[]{1, 2}},
+            {ROOT, "new double[] { 1, 2 }", new double[]{1, 2}},
 
     };
 
-	/*===================================================================
-		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++) {
             if (TESTS[i].length == 3) {
-                result.addTest(new PrimitiveArrayTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2]));
+                result.addTest(new PrimitiveArrayTest((String) TESTS[i][1], TESTS[i][0], (String) TESTS[i][1], TESTS[i][2]));
             } else {
                 if (TESTS[i].length == 4) {
-                    result.addTest(new PrimitiveArrayTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3]));
+                    result.addTest(new PrimitiveArrayTest((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 PrimitiveArrayTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2], TESTS[i][3], TESTS[i][4]));
+                        result.addTest(new PrimitiveArrayTest((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");
                     }
         return result;
     }
 
-	/*===================================================================
-		Constructors
-	  ===================================================================*/
-	public PrimitiveArrayTest()
-	{
-	    super();
-	}
+    /*===================================================================
+         Constructors
+       ===================================================================*/
+    public PrimitiveArrayTest()
+    {
+        super();
+    }
 
-	public PrimitiveArrayTest(String name)
-	{
-	    super(name);
-	}
+    public PrimitiveArrayTest(String name)
+    {
+        super(name);
+    }
 
     public PrimitiveArrayTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
     {

File src/test/java/org/ognl/test/PropertyTest.java

             { ROOT, "'last ' + getCurrentClass(@org.ognl.test.PropertyTest@VALUE)", "last foo stop"},
             { ROOT, "@org.ognl.test.PropertyTest@formatValue(property.millis, true, true)", formatValue((int)((Bean2)ROOT.getProperty()).getMillis(), true, true) }
     };
-
+    
     public static String formatValue(int millis, boolean b1, boolean b2)
     {
         return millis + "-formatted";
     }
-    
+
     /*===================================================================
          Public static methods
        ===================================================================*/
             } else
                 result.addTest(new PropertyTest((String)TESTS[i][1], TESTS[i][0], (String)TESTS[i][1], TESTS[i][2]));
         }
+        
         return result;
     }
 

File src/test/java/org/ognl/test/SimpleNavigationChainTreeTest.java

 import junit.framework.TestSuite;
 import 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 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 methods
+       ===================================================================*/
     public static TestSuite suite()
     {
-        TestSuite       result = new TestSuite();
+        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]));
+            result.addTest(new SimpleNavigationChainTreeTest((String) TESTS[i][0] + " (" + TESTS[i][1] + ")", null, (String) TESTS[i][0], TESTS[i][1]));
         }
         return result;
     }
 
-	/*===================================================================
-		Constructors
-	  ===================================================================*/
-	public SimpleNavigationChainTreeTest()
-	{
-	    super();
-	}
+    /*===================================================================
+         Constructors
+       ===================================================================*/
+    public SimpleNavigationChainTreeTest()
+    {
+        super();
+    }
 
-	public SimpleNavigationChainTreeTest(String name)
-	{
-	    super(name);
-	}
+    public SimpleNavigationChainTreeTest(String name)
+    {
+        super(name);
+    }
 
     public SimpleNavigationChainTreeTest(String name, Object root, String expressionString, Object expectedResult, Object setValue, Object expectedAfterSetResult)
     {
         super(name, root, expressionString, expectedResult);
     }
 
-	/*===================================================================
-		Overridden methods
-	  ===================================================================*/
+    /*===================================================================
+         Overridden methods
+       ===================================================================*/
     protected void runTest() throws Exception
     {
-        assertTrue(Ognl.isSimpleNavigationChain(getExpression(), _context) == ((Boolean)getExpectedResult()).booleanValue());
+        assertTrue(Ognl.isSimpleNavigationChain(getExpression(), _context) == ((Boolean) getExpectedResult()).booleanValue());
     }
 }

File src/test/java/org/ognl/test/StaticsAndConstructorsTest.java

             { "getStaticInt()", new Integer(Root.getStaticInt()) },
             { "@org.ognl.test.objects.Root@getStaticInt()", new Integer(Root.getStaticInt()) },
             { "new org.ognl.test.objects.Simple(property).getStringValue()", new Simple().getStringValue() },
-            { "new org.ognl.test.objects.Simple(map['test'].property).getStringValue()", new Simple().getStringValue() }, 
+            { "new org.ognl.test.objects.Simple(map['test'].property).getStringValue()", new Simple().getStringValue() },
             { "map.test.getCurrentClass(@org.ognl.test.StaticsAndConstructorsTest@KEY.toString())", "size stop"}
     };
 

File src/test/java/org/ognl/test/objects/MenuItem.java

+package org.ognl.test.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ */
+public class MenuItem {
+
+    private String page;
+	private String label;
+	private List<MenuItem> children = new ArrayList<MenuItem>();
+
+	public MenuItem(String page, String label){
+		this(page, label, new ArrayList<MenuItem>());
+	}
+
+	public MenuItem(String page, String label, List<MenuItem> children){
+		this.page = page;
+		this.label = label;
+		this.children = children;
+	}
+
+	public List<MenuItem> getChildren() {
+		return children;
+	}
+
+	public String getLabel() {
+		return label;
+	}
+
+	public String getPage() {
+		return page;
+	}
+	
+	public String toString(){
+		StringBuffer sb = new StringBuffer("MenuItem[");
+		sb.append("page="+getPage());
+		sb.append(",label="+getLabel());
+		sb.append(",children="+getChildren().size());
+		sb.append("]");
+		return sb.toString();
+	}
+}

File src/test/java/org/ognl/test/objects/Messages.java

+package org.ognl.test.objects;
+
+import java.util.Map;
+
+/**
+ *
+ */
+public class Messages {
+
+    Map _source;
+
+    public Messages(Map source)
+    {
+        _source = source;
+    }
+    
+    public String getMessage(String key)
+    {
+        return (String)_source.get(key);
+    }
+}

File src/test/java/org/ognl/test/objects/Root.java

         return value + " stop";
     }
 
+    public Messages getMessages()
+    {
+        return new Messages(map);
+    }
+
     public Map getMap()
     {
         return map;