Commits

jkuh...@d4b077e3-5828-0410-b394-cb2b42183085  committed c13450e

Fixes OGNL-84, OGNL-83. Precasting statements were being stolen by ASTMethod for inner children incorrectly. ASTProperty also wasn't setting the correct current type on previously indexed methods.

Also reverted surefire version since someone there seems to have broken the current version.

  • Participants
  • Parent commits 74c6c1d

Comments (0)

Files changed (13)

   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
+      <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$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
+      <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/objects/Indexed.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Indexed.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/IndexedPropertyTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/IndexedPropertyTest.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/ListPropertyAccessor.java" afterPath="$PROJECT_DIR$/src/java/ognl/ListPropertyAccessor.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTProperty.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTProperty.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/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="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/BaseIndexed.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTChain.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTChain.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" show_ignored="false" />
     <subPane>
       <PATH>
         <PATH_ELEMENT>
-          <option name="myItemId" value="com.intellij.openapi.project.impl.ProjectImpl@16143d7" />
+          <option name="myItemId" value="com.intellij.openapi.project.impl.ProjectImpl@178ff42" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
-          <option name="myItemId" value="com.intellij.openapi.project.impl.ProjectImpl@16143d7" />
+          <option name="myItemId" value="com.intellij.openapi.project.impl.ProjectImpl@178ff42" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
       <showLibraryContents />
       <hideEmptyPackages />
       <abbreviatePackageNames />
-      <showStructure PackagesPane="false" Scope="false" Favorites="false" ProjectPane="false" />
+      <showStructure ProjectPane="false" Scope="false" PackagesPane="false" Favorites="false" />
       <autoscrollToSource />
       <autoscrollFromSource />
       <sortByType />
     <option name="referencePos" value="0" />
     <option name="showLabels" value="true" />
   </component>
-  <component name="RunManager" selected="JUnit.PropertyTest">
-    <tempConfiguration default="false" name="PropertyTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+  <component name="RunManager" selected="JUnit.IndexedPropertyTest">
+    <tempConfiguration default="false" name="IndexedPropertyTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <pattern value="org.ognl.test.*" />
       <module name="OGNL" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
       <option name="ALTERNATIVE_JRE_PATH" value="/usr/local/jdk1.6.0_02" />
       <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.IndexedPropertyTest" />
       <option name="METHOD_NAME" value="" />
       <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" value="" />
         <option name="Make" value="true" />
       </method>
     </configuration>
+    <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+      <option name="MAIN_CLASS_NAME" />
+      <option name="VM_PARAMETERS" />
+      <option name="PROGRAM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <module name="" />
+    </configuration>
     <configuration default="true" type="Applet" factoryName="Applet">
       <module name="" />
       <option name="MAIN_CLASS_NAME" />
       <option name="HOST" value="localhost" />
       <option name="PORT" value="5005" />
     </configuration>
-    <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
-      <option name="MAIN_CLASS_NAME" />
-      <option name="VM_PARAMETERS" />
-      <option name="PROGRAM_PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <option name="ENV_VARIABLES" />
-      <module name="" />
-    </configuration>
     <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local">
       <option name="WORKING_DIRECTORY" />
       <option name="HOST" value="localhost" />
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="115" y="165" width="2163" height="1371" extended-state="0" />
+    <frame x="115" y="165" width="2279" height="1374" 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="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23937908" order="8" />
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32651392" order="1" />
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.50491" order="3" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3257143" order="1" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.5044898" order="3" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2381342" order="8" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.26595744" order="8" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.26530612" 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.24975657" order="1" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
       <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="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.26033255" order="0" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2683476" 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.3488372" order="6" />
       <window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2749591" order="2" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2742857" order="2" />
       <window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32924837" order="8" />
+      <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="Maven" 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="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
     <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
     <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
-    <option name="LAST_COMMIT_MESSAGE" value="Fixes OGNL-77. ASTAdd wasn't setting the context type before returning." />
+    <option name="LAST_COMMIT_MESSAGE" value="Fixes OGNL-84, OGNL-83.  Precasting statements were being stolen by ASTMethod for inner children incorrectly.  ASTProperty also wasn't setting the correct current type on previously indexed methods. &#10;&#10;Also reverted surefire version since someone there seems to have broken the current version." />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
     <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
     <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="ASTTest had been quietly failing since the last set of changes. Not good for performance..." />
-    <MESSAGE value="Fixes OGNL-50. Boolean literals within ASTAnd expressions were failing compilation (stupid ass javassist) unless surrounded with ( )." />
     <MESSAGE value="-) Fix for OGNL-52. Added a synchronized() block around the method object being invoked to prevent failures with the accessible flag being turned on/off temporarily. &#10;&#10;-) Added new unit test but failed to verify OGNL-51." />
     <MESSAGE value="Fixes OGNL-54. OgnlRuntime method finders and getChildSource weren't properly handling properties that should only be referencing root expressions (if any)..Such as method parameters / etc..Added logic to correctly set the context type/object state up for each of these." />
     <MESSAGE value="Fixes OGNL-55.&#10;&#10;ExpressionCompiler.shouldCast(Node) was returning true for ASTConst ...Obviousoly not correct." />
     <MESSAGE value="Fixes OGNL-75." />
     <MESSAGE value="Fixes OGNL-76. ObjectPropertyAccessor was incorrectly trying to generate an array property reference in the setter code (ie java.lang.Object[].class) - which is of course invalid.  Changed to use the OgnlOps.toArray() style parameter conversion." />
     <MESSAGE value="Fixes OGNL-77. ASTAdd wasn't setting the context type before returning." />
+    <MESSAGE value="Fixes TAPESTRY-1419. Needed to add () around widening expressions in ASTList." />
+    <MESSAGE value="Fixes OGNL-84, OGNL-83.  Precasting statements were being stolen by ASTMethod for inner children incorrectly.  ASTProperty also wasn't setting the correct current type on previously indexed methods. &#10;&#10;Also reverted surefire version since someone there seems to have broken the current version." />
   </component>
   <component name="XPathView.XPathProjectComponent">
     <history />
     <option name="myLastEditedConfigurable" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/IndexAccessTest.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ObjectPropertyAccessor.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="42" column="12" selection-start="2040" selection-end="2040" vertical-scroll-proportion="0.12594458">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
+        <state line="222" column="54" selection-start="8064" selection-end="8064" vertical-scroll-proportion="0.42629817">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="jar:///usr/local/jdk1.5.0_11/src.zip!/java/util/List.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="89" column="17" selection-start="4130" selection-end="4130" vertical-scroll-proportion="0.33333334">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ListPropertyAccessor.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="218" column="8" selection-start="8554" selection-end="8554" vertical-scroll-proportion="0.6482412">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTProperty.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="185" column="0" selection-start="6936" selection-end="6936" vertical-scroll-proportion="0.73325497">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ASTPropertyTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="188" column="38" selection-start="6335" selection-end="6335" vertical-scroll-proportion="0.68592966">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/MapPropertyAccessor.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="134" column="9" selection-start="5469" selection-end="5469" vertical-scroll-proportion="0.3877791">
+          <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTChain.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="294" column="0" selection-start="12832" selection-end="12832" vertical-scroll-proportion="0.44080603">
+        <state line="291" column="0" selection-start="12583" selection-end="12583" vertical-scroll-proportion="0.30150753">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ArrayElementsAccessor.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTMethod.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="56" column="0" selection-start="2491" selection-end="2491" vertical-scroll-proportion="0.3274559">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ArrayPropertyAccessor.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="214" column="8" selection-start="8783" selection-end="8783" vertical-scroll-proportion="0.7607053">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayElementsTest.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="56" column="100" selection-start="3065" selection-end="3065" vertical-scroll-proportion="0.22753988">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ObjectPropertyAccessor.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="211" column="0" selection-start="7764" selection-end="7764" vertical-scroll-proportion="0.42065492">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlOps.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="514" column="4" selection-start="18417" selection-end="18417" vertical-scroll-proportion="0.38371116">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/Ognl.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="122" column="0" selection-start="5482" selection-end="5482" vertical-scroll-proportion="0.33254716">
+        <state line="219" column="0" selection-start="7760" selection-end="7760" vertical-scroll-proportion="0.5477387">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Bean2.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="42" column="0" selection-start="1957" selection-end="1957" vertical-scroll-proportion="0.16372795">
+        <state line="47" column="0" selection-start="2020" selection-end="2020" vertical-scroll-proportion="0.22613065">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/BaseBean.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="26" column="5" selection-start="370" selection-end="370" vertical-scroll-proportion="0.30226701">
+        <state line="99" column="31" selection-start="4513" selection-end="4513" vertical-scroll-proportion="0.28894472">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAdd.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/IndexedPropertyTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="273" column="41" selection-start="12513" selection-end="12513" vertical-scroll-proportion="0.6108491">
+        <state line="60" column="0" selection-start="3289" selection-end="3289" vertical-scroll-proportion="0.36432162">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/BaseIndexed.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="108" column="71" selection-start="7092" selection-end="7092" vertical-scroll-proportion="0.64231735">
+        <state line="10" column="5" selection-start="183" selection-end="183" vertical-scroll-proportion="0.12562814">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Indexed.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="67" column="0" selection-start="2513" selection-end="2513" vertical-scroll-proportion="0.4522613">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/IndexAccessTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="37" column="13" selection-start="1904" selection-end="1904" vertical-scroll-proportion="0.06281407">
           <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="489" column="27" selection-start="17410" selection-end="17410" vertical-scroll-proportion="0.50377834">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTList.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="185" column="20" selection-start="7027" selection-end="7027" vertical-scroll-proportion="0.4836272">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="262" column="5" selection-start="7762" selection-end="7762" vertical-scroll-proportion="0.32073888">
+        <state line="543" column="54" selection-start="19331" selection-end="19331" vertical-scroll-proportion="0.23869346">
           <folding />
         </state>
       </provider>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.3.1-SNAPSHOT</version>
                 <configuration>
                     <excludes>
                         <exclude>**/OgnlTestCase.java</exclude>

File src/java/ognl/ASTChain.java

             if ((_children != null) && (_children.length > 0)) {
                 for(int i = 0; i < _children.length; i++) {
                     
-                    //System.out.println("astchain child: " + _children[i].getClass().getName() + " with current object target " + context.getCurrentObject());
-                    
+                    /* System.out.println("astchain child: " + _children[i].getClass().getName()
+                                       + " with current object target " + context.getCurrentObject()
+                                       + " current type: " + context.getCurrentType()); */
+
                     String value = _children[i].toGetSourceString(context, context.getCurrentObject());
                     
                     //System.out.println("astchain child returned >>  " + value + "  <<");
                         _lastType = (NodeType)_children[i];
                     }
 
-                    //System.out.println("Astchain i: " + i + " currentobj : " + context.getCurrentObject() + " and root: " + context.getRoot());
+//                    System.out.println("Astchain i: " + i + " currentobj : " + context.getCurrentObject() + " and root: " + context.getRoot());
                     if (!ASTVarRef.class.isInstance(_children[i]) && !constructor && !(OrderedReturn.class.isInstance(_children[i]) && ((OrderedReturn)_children[i]).getLastExpression() != null)
                             && (_parent == null || !ASTSequence.class.isInstance(_parent))) {
-                        
+
                         value = OgnlRuntime.getCompiler().castExpression(context, _children[i], value);
                     }
-/*
 
-                    System.out.println("astchain value now : " + value + " with index " + i
+                    /*System.out.println("astchain value now : " + value + " with index " + i
                     + " current type " + context.getCurrentType() + " current accessor " + context.getCurrentAccessor()
-                    + " prev type " + context.getPreviousType() + " prev accessor " + context.getPreviousAccessor());
-*/
+                    + " prev type " + context.getPreviousType() + " prev accessor " + context.getPreviousAccessor());*/
 
                     if (OrderedReturn.class.isInstance(_children[i]) && ((OrderedReturn)_children[i]).getLastExpression() != null) {
                         

File src/java/ognl/ASTMethod.java

 
     public String toGetSourceString(OgnlContext context, Object target)
     {
-        //System.out.println("methodName is " + _methodName + " for target " + target + " and parent: " + _parent);
+        /*System.out.println("methodName is " + _methodName + " for target " + target + " target class: " + (target != null ? target.getClass() : null)
+                           + " current type: " + context.getCurrentType());*/
         if (target == null)
             throw new UnsupportedCompilationException("Target object is null.");
 
             if ((_children != null) && (_children.length > 0)) {
                 
                 Class[] parms = m.getParameterTypes();
-
+                String prevCast = (String)context.remove(ExpressionCompiler.PRE_CAST);
+                
                 for(int i = 0; i < _children.length; i++) {
                     if (i > 0) {
                         result = result + ", ";
                     
                     result += parmString;
                 }
+
+                if (prevCast != null) {
+                    
+                    context.put(ExpressionCompiler.PRE_CAST, prevCast);
+                }
             }
             
             Object contextObj = getValueBody(context, target);
             _coreExpression = result + ";";
             _lastExpression = "null";
         }
-        
+
         context.setCurrentType(m.getReturnType());
         context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
-        
+
         return result;
     }
 
             if ((_children != null) && (_children.length > 0)) {
 
                 Class[] parms = m.getParameterTypes();
+                String prevCast = (String)context.remove(ExpressionCompiler.PRE_CAST);
                 
                 for(int i = 0; i < _children.length; i++) {
 
                     
                     result += parmString;
                 }
+
+                if (prevCast != null) {
+
+                    context.put(ExpressionCompiler.PRE_CAST, prevCast);
+                }
             }
 
             Object contextObj = getValueBody(context, target);

File src/java/ognl/ASTProperty.java

         Method m = null;
         
         try {
-           //System.out.println("astproperty is indexed? : " + isIndexedAccess() + " child: " + _children[0].getClass().getName()
-             //      + " target: " + target.getClass().getName() + " current object: " + context.getCurrentObject().getClass().getName());
+           /*System.out.println("astproperty is indexed? : " + isIndexedAccess() + " child: " + _children[0].getClass().getName()
+                   + " target: " + target.getClass().getName() + " current object: " + context.getCurrentObject().getClass().getName());*/
             
             if (isIndexedAccess()) {
 
                     srcString = "\"" + srcString + "\"";
                 }
 
-                //System.out.println("indexed getting with child srcString: " + srcString + " value class: " + value.getClass() + " and child: " + _children[0].getClass());
+                // System.out.println("indexed getting with child srcString: " + srcString + " value class: " + value.getClass() + " and child: " + _children[0].getClass());
                 
                 if (context.get("_indexedMethod") != null) {
                     
 
                     context.setCurrentType(_getterClass);
                     context.setCurrentObject(target);
+                    context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
 
                     return "." + m.getName() + "(" + srcString + ")";
                 } else {
                     context.setCurrentType(currType);
                     context.setPreviousType(prevType);
                     
-                    /*
-                    System.out.println("astprop srcString: " + srcString 
+                    /*System.out.println("astprop srcString: " + srcString
                             + " from child class " + _children[0].getClass().getName()
                             + " and indexVal " + indexVal
                             + " propertyAccessor : " + p.getClass().getName() + " context obj " + context.getCurrentObject()
-                            + " context obj is array? : " + context.getCurrentObject().getClass().isArray());
-                    */
+                            + " context obj is array? : " + context.getCurrentObject().getClass().isArray()
+                                       + " current type: " + context.getCurrentType());*/
                     
                     if (ASTConst.class.isInstance(_children[0]) && Number.class.isInstance(context.getCurrentObject()))
                         context.setCurrentType(OgnlRuntime.getPrimitiveWrapperClass(context.getCurrentObject().getClass()));
 
                     result = p.getSourceAccessor(context, target, srcString);
-                    _getterClass = p.getPropertyClass(context, target, srcString);
+                    _getterClass = context.getCurrentType();
+                    /* _getterClass = p.getPropertyClass(context, target, srcString);
                     
                     if (_getterClass == null && context.getCurrentObject().getClass().isArray() 
                             && ArrayPropertyAccessor.class.isAssignableFrom(p.getClass())) {
                     } else if (_getterClass == null && indexVal != null) {
                         
                        _getterClass = indexVal.getClass().isArray() ? indexVal.getClass().getComponentType() : indexVal.getClass();
-                    }
+                    }*/
 
                     //System.out.println("result of index src is " + result + " and getterClass " + _getterClass);
                     
-                    context.setCurrentType(_getterClass);
+                    //context.setCurrentType(_getterClass);
                     context.setCurrentObject(indexVal);
-                    
+
                     return result;
                 }
 
                             String.class.isInstance(context.getCurrentObject())) {
                             srcString = "\"" + srcString + "\"";
                         }
-
-
+                        
                         context.setCurrentObject(currObj);
                         context.setCurrentType(currType);
                         context.setPreviousType(prevType);

File src/java/ognl/ListPropertyAccessor.java

         
         // TODO: This feels really inefficient, must be some better way
         // check if the index string represents a method on a custom class implementing java.util.List instead..
+        
         if (context.getCurrentObject() != null && !Number.class.isInstance(context.getCurrentObject())) {
 
             try {

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

                 && context.getCurrentType().isAssignableFrom(context.getCurrentObject().getClass())
                 && context.getCurrentAccessor().isAssignableFrom(context.getPreviousType()))
             || body == null || body.trim().length() < 1
-            || (context.getCurrentType() != null && context.getCurrentType().isArray() 
+            || (context.getCurrentType() != null && context.getCurrentType().isArray()
                 && (context.getPreviousType() == null || context.getPreviousType() != Object.class))
             || ASTOr.class.isInstance(expression)
             || ASTAnd.class.isInstance(expression)
             || ASTRootVarRef.class.isInstance(expression)
             || context.getCurrentAccessor() == Class.class
-            || Number.class.isAssignableFrom(context.getCurrentAccessor())
             || (context.get(ExpressionCompiler.PRE_CAST) != null && ((String) context.get(ExpressionCompiler.PRE_CAST)).startsWith("new"))
             || ASTStaticField.class.isInstance(expression)
             || (OrderedReturn.class.isInstance(expression) && ((OrderedReturn) expression).getLastExpression() != null))

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

 
         assertEquals(".get(ognl.OgnlOps#getIntValue(((org.ognl.test.objects.Root)$2)..getGenericIndex().toString()))", p.toGetSourceString(context, root.getList()));
         assertEquals(root.getArray(), context.getCurrentObject());
-        assertEquals(root.getArray().getClass().getComponentType(), context.getCurrentType());
+        assertEquals(Object.class, context.getCurrentType());
     }
 
     public void test_Complicated_List() throws Exception

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

 
 import junit.framework.TestSuite;
 import org.ognl.test.objects.Indexed;
+import org.ognl.test.objects.Root;
 
 public class IndexedPropertyTest extends OgnlTestCase {
 
     private static Indexed INDEXED = new Indexed();
+    private static Root ROOT = new Root();
 
     private static Object[][] TESTS = {
             // Indexed properties
             {INDEXED, "values[1]", "xxxx" + "xxx"}, // getValues(int) again to check if setValues(int, String) was called
             {INDEXED, "setValues(2, \"xxxx\")", null}, // was "baz" -> "xxxx"
             {INDEXED, "getTitle(list.size)", "Title count 3"},
-            {INDEXED, "source.total", 1}
+            {INDEXED, "source.total", 1},
+            {ROOT, "indexer.line[index]", "line:1"},
+            {INDEXED, "list[2].longValue()", new Long(3)},
+            {ROOT, "map.value.id", new Long(1)}
     };
 
     /*

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

             { ROOT, "flyingMonkey", Boolean.TRUE},
             { ROOT, "expiration == null ? '' : @org.ognl.test.PropertyTest@DATE_FORMAT.format(expiration)", ""},
             { ROOT, "printDelivery ? 'javascript:toggle(' + bean2.id + ');' : ''", "javascript:toggle(1);"},
-            { ROOT, "{theInt + 1}", Arrays.asList(new Integer(ROOT.getTheInt() + 1)) }
+            { ROOT, "{theInt + 1}", Arrays.asList(new Integer(ROOT.getTheInt() + 1)) },
+            { ROOT, " !(printDelivery || @Boolean@FALSE)", Boolean.FALSE}
     };
 
     public static String formatValue(int millis, boolean b1, boolean b2)

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

+package org.ognl.test.objects;
+
+/**
+ * Class used to test inheritance.
+ */
+public class BaseIndexed {
+
+    public Object getLine(int index)
+    {
+        return "line:" + index;
+    }
+}

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

 import java.util.Collection;
 import java.util.List;
 
-public class Indexed
+public class Indexed extends BaseIndexed
 {
     private String[] _values = new String[] { "foo", "bar", "baz" };
 
     private List _list = new ArrayList();
-
     private ListSource _source = new ListSourceImpl();
 
     public Indexed()

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

     private Date _date = new Date();
 
     private ITreeContentProvider _contentProvider = new TreeContentProvider();
-
+    private Indexed _indexed = new Indexed();
+    
     /*===================================================================
 		Public static methods
 	  ===================================================================*/
     {
         return myMap.get(name);
     }
-    
+
+    public Indexed getIndexer()
+    {
+        return _indexed;
+    }
+
     public BeanProvider getBeans()
     {
         return _beanProvider;
         return Boolean.TRUE;
     }
 
+    public Boolean isDumb()
+    {
+        return Boolean.FALSE;
+    }
+
     public Date getExpiration()
     {
         return null;