Commits

Anonymous committed 7e3f2bb

Fixes OGNL-97. Was doing the old root class casting logic on root expressions when it seems to be unneccessary now that everything is properly being populated in the context accessor/type class value stack.

Comments (0)

Files changed (11)

   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTRemainder.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTRemainder.java" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyArithmeticTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyArithmeticTest.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/ObjectPropertyAccessor.java" afterPath="$PROJECT_DIR$/src/java/ognl/ObjectPropertyAccessor.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Simple.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Simple.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/MethodTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/MethodTest.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/java/ognl/MethodAccessor.java" afterPath="$PROJECT_DIR$/src/java/ognl/MethodAccessor.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/enhance/TestExpressionCompiler.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/enhance/TestExpressionCompiler.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" />
     </list>
   </component>
   <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
       <file leaf-file-name="ExpressionCompiler.java" pinned="false" current="true" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/java/ognl/enhance/ExpressionCompiler.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="549" column="5" selection-start="19830" selection-end="19830" vertical-scroll-proportion="0.44006705">
+            <state line="19" column="7" selection-start="533" selection-end="533" vertical-scroll-proportion="0.17602682">
               <folding />
             </state>
           </provider>
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
       </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="OGNL" />
+          <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" />
+          <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_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/ognl/test/enhance" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="OGNL" />
+          <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>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="OGNL" />
+          <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" Scope="false" PackagesPane="false" ProjectPane="false" />
+      <showStructure PackagesPane="false" Scope="false" Favorites="false" ProjectPane="false" />
       <autoscrollToSource />
       <autoscrollFromSource />
       <sortByType />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatWidth0" value="284" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatWidth3" value="35" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatWidth2" value="304" />
+    <property name="cvs_file_history_treeOrder2" value="2" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatOrder1" value="1" />
-    <property name="cvs_file_history_treeOrder2" value="2" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatOrder0" value="0" />
     <property name="cvs_file_history_treeOrder1" value="1" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatOrder3" value="3" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeWidth2" value="248" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeWidth1" value="274" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatOrder4" value="4" />
-    <property name="last_opened_file_path" value="$USERPROFILE$/.m2" />
+    <property name="last_opened_file_path" value="$USERPROFILE$/projects/tapestry/tapestry-framework/src/java/org/apache/tapestry/services/impl" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeWidth0" value="243" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeWidth4" value="1042" />
+    <property name="GoToClass.includeJavaFiles" value="false" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeWidth3" value="243" />
-    <property name="GoToClass.includeJavaFiles" value="false" />
     <property name="GoToClass.toSaveIncludeLibraries" value="false" />
     <property name="cvs_file_history_treeWidth0" value="503" />
     <property name="cvs_file_history_treeWidth1" value="503" />
     <property name="cvs_file_history_treeWidth2" value="504" />
+    <property name="cvs_file_history_treeWidth3" value="503" />
     <property name="cvs_file_history_flatWidth2" value="504" />
-    <property name="cvs_file_history_treeWidth3" value="503" />
+    <property name="cvs_file_history_treeOrder0" value="0" />
     <property name="cvs_file_history_flatWidth3" value="503" />
-    <property name="cvs_file_history_treeOrder0" value="0" />
     <property name="MemberChooser.showClasses" value="true" />
+    <property name="cvs_file_history_flatWidth0" value="503" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_flatWidth4" value="1098" />
-    <property name="cvs_file_history_flatWidth0" value="503" />
     <property name="cvs_file_history_flatWidth1" value="503" />
     <property name="GoToClass.includeLibraries" value="false" />
     <property name="GoToFile.includeJavaFiles" value="false" />
     <property name="RunManagerConfig.compileBeforeRunning" value="true" />
+    <property name="cvs_file_history_flatOrder2" value="2" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeOrder3" value="3" />
-    <property name="cvs_file_history_flatOrder2" value="2" />
+    <property name="cvs_file_history_flatOrder3" value="3" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeOrder4" value="4" />
-    <property name="cvs_file_history_flatOrder3" value="3" />
+    <property name="cvs_file_history_flatOrder0" value="0" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeOrder1" value="1" />
-    <property name="cvs_file_history_flatOrder0" value="0" />
+    <property name="cvs_file_history_flatOrder1" value="1" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeOrder2" value="2" />
-    <property name="cvs_file_history_flatOrder1" value="1" />
     <property name="FileHistory.org.jetbrains.idea.svn.history.SvnHistoryProvider_treeOrder0" value="0" />
     <property name="MemberChooser.copyJavadoc" value="false" />
   </component>
-  <component name="ReadonlyStatusHandler">
-    <option name="SHOW_DIALOG" value="true" />
-  </component>
   <component name="RecentsManager">
     <key name="MoveMembersDialog.RECENTS_KEY">
       <recent name="ognl.enhance.ExpressionCompiler" />
     <option name="referencePos" value="0" />
     <option name="showLabels" value="true" />
   </component>
-  <component name="RunManager" selected="JUnit.PropertyArithmeticTest">
-    <tempConfiguration default="false" name="PropertyArithmeticTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
-      <pattern value="org.ognl.test.*" />
+  <component name="RunManager" selected="JUnit.TestExpressionCompiler">
+    <tempConfiguration default="false" name="TestExpressionCompiler" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+      <pattern value="org.ognl.test.enhance.*" />
       <module name="OGNL" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <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.PropertyArithmeticTest" />
+      <option name="PACKAGE_NAME" value="org.ognl.test.enhance" />
+      <option name="MAIN_CLASS_NAME" value="org.ognl.test.enhance.TestExpressionCompiler" />
       <option name="METHOD_NAME" value="" />
       <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" value="" />
         <option name="Make" value="true" />
       </method>
     </tempConfiguration>
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+    </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="Application" factoryName="Application" enabled="false" merge="false">
       <option name="MAIN_CLASS_NAME" />
       <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="SHMEM_ADDRESS" value="javadebug" />
-      <option name="HOST" value="localhost" />
-      <option name="PORT" value="5005" />
-    </configuration>
     <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local">
       <option name="WORKING_DIRECTORY" />
       <option name="HOST" value="localhost" />
     <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 unicode bug in OgnlOps.escapeString() iso control handling." />
+    <option name="LAST_COMMIT_MESSAGE" value="Fixes OGNL-97.  Was doing the old root class casting logic on root expressions when it seems to be unneccessary now that everything is properly being populated in the context accessor/type class value stack." />
     <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_CHANGELIST" value="false" />
     <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
     <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
-    <MESSAGE value="Fixes OGNL-72. ASTCtor was setting the generic type instead of the actual type... This was breaking things when the type being constructed was an array." />
-    <MESSAGE value="Fixes OGNL-74. Used a 1.5 only jre feature of Integer.valueOf(int)" />
     <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="Added new property arithmetic test since so many issues have been cropping up with non constant arithmetic expressions.  Fixed bug with substraction + generic object class type interface ." />
     <MESSAGE value="Fixes OGNL-96. Object equality." />
     <MESSAGE value="Fixes unicode bug in OgnlOps.escapeString() iso control handling." />
+    <MESSAGE value="Fixes OGNL-98.  ASTRemainder was using the old method of source getting before the recent NumericExpression refactor was done." />
+    <MESSAGE value="Fixes OGNL-97.  Was doing the old root class casting logic on root expressions when it seems to be unneccessary now that everything is properly being populated in the context accessor/type class value stack." />
   </component>
   <component name="VssConfiguration">
     <option name="CLIENT_PATH" value="" />
     <option name="myLastEditedConfigurable" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="jar:///usr/local/jdk1.5.0_12/src.zip!/java/lang/String.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="404" column="21" selection-start="15788" selection-end="15788" vertical-scroll-proportion="0.57931846">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="jar:///usr/local/jdk1.5.0_12/src.zip!/java/lang/Integer.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="102" column="63" selection-start="3886" selection-end="3886" vertical-scroll-proportion="0.7027027">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="jar:///usr/local/jdk1.5.0_12/src.zip!/java/lang/Character.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="4928" column="26" selection-start="193578" selection-end="193578" vertical-scroll-proportion="0.3149236">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/QuotingTest.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="37" column="22" selection-start="1917" selection-end="1917" vertical-scroll-proportion="0.14101058">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ConstantTest.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="68" column="72" selection-start="3460" selection-end="3460" vertical-scroll-proportion="0.4526404">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAdd.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="237" column="32" selection-start="10104" selection-end="10104" vertical-scroll-proportion="0.37720034">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pom.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="13" column="0" selection-start="511" selection-end="511" vertical-scroll-proportion="0.12733446">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlOps.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="977" column="26" selection-start="35038" selection-end="35038" vertical-scroll-proportion="0.22045264">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTConst.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="156" column="11" selection-start="5203" selection-end="5203" vertical-scroll-proportion="0.5473596">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTChain.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="84" column="0" selection-start="2861" selection-end="2861" vertical-scroll-proportion="0.37720034">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/TestModel.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="21" column="0" selection-start="289" selection-end="289" vertical-scroll-proportion="0.26404023">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTRemainder.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="58" column="0" selection-start="2404" selection-end="2404" vertical-scroll-proportion="0.51116335">
-          <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="294" column="5" selection-start="8311" selection-end="8311" vertical-scroll-proportion="0.24979044">
-          <folding />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyArithmeticTest.java">
       <provider selected="true" editor-type-id="text-editor">
         <state line="31" column="58" selection-start="1662" selection-end="1662" vertical-scroll-proportion="0.364627">
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTOr.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="102" column="0" selection-start="3713" selection-end="3713" vertical-scroll-proportion="0.30176026">
+          <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="36" column="13" selection-start="1827" selection-end="1827" vertical-scroll-proportion="0.062866725">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/MethodTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="48" column="51" selection-start="2469" selection-end="2469" vertical-scroll-proportion="0.2263202">
+          <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="118" column="46" selection-start="7830" selection-end="7830" vertical-scroll-proportion="0.76697403">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Simple.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="208" column="5" selection-start="4765" selection-end="4898" vertical-scroll-proportion="0.7485331">
+          <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="451" column="5" selection-start="10901" selection-end="10901" vertical-scroll-proportion="0.45934618">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/IndexedPropertyTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="59" column="0" selection-start="3283" selection-end="3283" vertical-scroll-proportion="0.493537">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ObjectPropertyAccessor.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="198" column="12" selection-start="7269" selection-end="7269" vertical-scroll-proportion="0.3877791">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$USERPROFILE$/projects/tapestry/tapestry-framework/src/java/org/apache/tapestry/services/impl/HiveMindExpressionCompiler.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="125" column="34" selection-start="4320" selection-end="4320" vertical-scroll-proportion="-4.1621623">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/enhance/TestExpressionCompiler.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="136" column="8" selection-start="4004" selection-end="4004" vertical-scroll-proportion="0.50963956">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/enhance/OgnlExpressionCompiler.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="84" column="10" selection-start="3548" selection-end="3548" vertical-scroll-proportion="0.37133276">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTProperty.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="391" column="0" selection-start="15979" selection-end="15979" vertical-scroll-proportion="0.5029338">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/MethodAccessor.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="65" column="12" selection-start="3223" selection-end="3223" vertical-scroll-proportion="0.4526404">
+          <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="549" column="5" selection-start="19830" selection-end="19830" vertical-scroll-proportion="0.44006705">
+        <state line="19" column="7" selection-start="533" selection-end="533" vertical-scroll-proportion="0.17602682">
           <folding />
         </state>
       </provider>

src/java/ognl/ASTProperty.java

 public class ASTProperty extends SimpleNode implements NodeType
 {
     private boolean _indexedAccess = false;
-    
+
     private Class _getterClass;
     private Class _setterClass;
-    
+
     public ASTProperty(int id)
     {
         super(id);
     {
         return _indexedAccess;
     }
-    
+
     /**
      * Returns true if this property is described by an IndexedPropertyDescriptor and that if
      * followed by an index specifier it will call the index get/set methods rather than go through
      * property accessors.
      */
     public int getIndexedPropertyType(OgnlContext context, Object source)
-        throws OgnlException
+            throws OgnlException
     {
         Class type = context.getCurrentType();
         Class prevType = context.getPreviousType();
                 Object property = getProperty(context, source);
 
                 if (property instanceof String) { return OgnlRuntime.getIndexedPropertyType(context,
-                        (source == null) ? null : OgnlRuntime.getCompiler().getInterfaceClass(source.getClass()), (String) property); }
+                                                                                            (source == null) ? null : OgnlRuntime.getCompiler().getInterfaceClass(source.getClass()), (String) property); }
             }
 
             return OgnlRuntime.INDEXED_PROPERTY_NONE;
             context.setPreviousType(prevType);
         }
     }
-    
+
     public Object getProperty(OgnlContext context, Object source)
-        throws OgnlException
+            throws OgnlException
     {
         return _children[0].getValue(context, context.getRoot());
     }
-    
+
     protected Object getValueBody(OgnlContext context, Object source)
-        throws OgnlException
+            throws OgnlException
     {
         Object result = null;
         Object property = null;
         result = OgnlRuntime.getProperty(context, source, property);
 
         if (result == null) {
-            
+
             result = OgnlRuntime.getNullHandler(OgnlRuntime.getTargetClass(source)).nullPropertyValue(context, source, property);
         }
-        
+
         return result;
     }
-    
+
     protected void setValueBody(OgnlContext context, Object target, Object value)
-        throws OgnlException
+            throws OgnlException
     {
         OgnlRuntime.setProperty(context, target, getProperty(context, target), value);
     }
-    
+
     public boolean isNodeSimpleProperty(OgnlContext context)
-        throws OgnlException
+            throws OgnlException
     {
         return (_children != null) && (_children.length == 1) && ((SimpleNode) _children[0]).isConstant(context);
     }
-    
+
     public Class getGetterClass()
     {
         return _getterClass;
     }
-    
+
     public Class getSetterClass()
     {
         return _setterClass;
     }
-    
+
     public String toString()
     {
         String result;
-        
+
         if (isIndexedAccess()) {
             result = "[" + _children[0] + "]";
         } else {
         }
         return result;
     }
-    
+
     public String toGetSourceString(OgnlContext context, Object target)
     {
         if (context.getCurrentObject() == null)
             throw new UnsupportedCompilationException("Current target is null.");
-        
+
         String result = "";
         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()) {
 
                 Object value = _children[0].getValue(context, context.getRoot());
-                
+
                 if (value == null || DynamicSubscript.class.isAssignableFrom(value.getClass()))
                     throw new UnsupportedCompilationException("Value passed as indexed property was null or not supported.");
 
                 // Get root cast string if the child is a type that needs it (like a nested ASTProperty)
-                
+
                 String srcString = _children[0].toGetSourceString(context, context.getRoot());
                 srcString = ExpressionCompiler.getRootExpression(_children[0], context.getRoot(), context) + srcString;
 
                 }
 
                 // System.out.println("indexed getting with child srcString: " + srcString + " value class: " + value.getClass() + " and child: " + _children[0].getClass());
-                
+
                 if (context.get("_indexedMethod") != null) {
-                    
+
                     m = (Method)context.remove("_indexedMethod");
                     _getterClass = m.getReturnType();
 
 
                     return "." + m.getName() + "(" + srcString + ")";
                 } else {
-                    
+
                     PropertyAccessor p = OgnlRuntime.getPropertyAccessor(target.getClass());
-                    
+
                     //System.out.println("child value : " + _children[0].getValue(context, context.getCurrentObject()) + " using propaccessor " + p.getClass().getName()
-                      //    + " and srcString " + srcString + " on target: " +  target);
+                    //    + " and srcString " + srcString + " on target: " +  target);
 
                     Object currObj = context.getCurrentObject();
                     Class currType = context.getCurrentType();
                     Class prevType = context.getPreviousType();
-                    
+
                     Object indexVal = p.getProperty(context, target, _children[0].getValue(context, context.getRoot()));
 
                     // reset current object for accessor
-                    
+
                     context.setCurrentObject(currObj);
                     context.setCurrentType(currType);
                     context.setPreviousType(prevType);
-                    
+
                     /*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()
-                                       + " current type: " + context.getCurrentType());*/
-                    
+   + " 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()
+              + " current type: " + context.getCurrentType());*/
+
                     if (ASTConst.class.isInstance(_children[0]) && Number.class.isInstance(context.getCurrentObject()))
                         context.setCurrentType(OgnlRuntime.getPrimitiveWrapperClass(context.getCurrentObject().getClass()));
 
                     }*/
 
                     //System.out.println("result of index src is " + result + " and getterClass " + _getterClass);
-                    
+
                     //context.setCurrentType(_getterClass);
                     context.setCurrentObject(indexVal);
 
                 }
 
             }
-            
+
             String name =  ((ASTConst) _children[0]).getValue().toString();
-            
+
             if (!Iterator.class.isAssignableFrom(context.getCurrentObject().getClass())
                 || (Iterator.class.isAssignableFrom(context.getCurrentObject().getClass()) && name.indexOf("next") < 0)) {
 
 
                     } catch (NoSuchPropertyException ex) { }
                 } finally {
-                    
+
                     context.setCurrentObject(currObj);
                 }
             }
 
             PropertyDescriptor pd = OgnlRuntime.getPropertyDescriptor(context.getCurrentObject().getClass(), name);
-            
+
             if (this.getIndexedPropertyType(context, context.getCurrentObject()) > 0 && pd != null){
-                
+
                 // if an indexed method accessor need to use special property descriptors to find methods
-                
+
                 if (pd instanceof IndexedPropertyDescriptor) {
                     m = ((IndexedPropertyDescriptor) pd).getIndexedReadMethod();
                 } else {
                         throw new OgnlException("property '" + name + "' is not an indexed property");
                     }
                 }
-                
-               //System.out.println("================== Indexed property type found for " + name);
+
+                //System.out.println("================== Indexed property type found for " + name);
                 if (_parent == null) {
                     // the above pd will be the wrong result sometimes, such as methods like getValue(int) vs String[] getValue() 
-                    
+
                     m = OgnlRuntime.getReadMethod(context.getCurrentObject().getClass(), name);
                     result = m.getName() + "()";
                     _getterClass = m.getReturnType();
                  System.out.println("astproperty trying to get " + name + " on object target: " + context.getCurrentObject().getClass().getName()
                         + " current type " + context.getCurrentType() + " current accessor " + context.getCurrentAccessor()
                     + " prev type " + context.getPreviousType() + " prev accessor " + context.getPreviousAccessor()); */
-               
-                
+
+
                 PropertyAccessor pa = OgnlRuntime.getPropertyAccessor(context.getCurrentObject().getClass());
 
-                if (context.getCurrentObject().getClass().isArray()) {
-                    
-                    if (pd == null) {
+                if (context.getCurrentObject().getClass().isArray())
+                {
+                    if (pd == null)
+                    {
                         pd = OgnlRuntime.getProperty(context.getCurrentObject().getClass(), name);
-                        
+
                         if (pd != null && pd.getReadMethod() != null) {
                             m = pd.getReadMethod();
                             result = pd.getName();
                         }
                     }
                 } else {
-                    
-                    if (pa != null) {
 
+                    if (pa != null)
+                    {
                         Object currObj = context.getCurrentObject();
                         Class currType = context.getCurrentType();
                         Class prevType = context.getPreviousType();
                             String.class.isInstance(context.getCurrentObject())) {
                             srcString = "\"" + srcString + "\"";
                         }
-                        
+
                         context.setCurrentObject(currObj);
                         context.setCurrentType(currType);
                         context.setPreviousType(prevType);
                         _getterClass = context.getCurrentType();
                     }
                 }
-                
+
             }
 
         } catch (Throwable t) {
             else
                 throw new RuntimeException(t);
         }
-        
+
         // set known property types for NodeType interface when possible
-        
+
         if (m != null) {
             _getterClass = m.getReturnType();
-            
+
             context.setCurrentType(m.getReturnType());
             context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
         }
+
+        context.setCurrentObject(target);
         
-        context.setCurrentObject(target);
-
         return result;
     }
-    
+
     boolean lastChild(OgnlContext context)
     {
         return _parent == null || context.get("_lastChild") !=  null;
     }
-    
+
     public String toSetSourceString(OgnlContext context, Object target)
     {
         String result = "";
         Method m = null;
-        
+
         if (context.getCurrentObject() == null)
             throw new UnsupportedCompilationException("Current target is null.");
-        
+
         //System.out.println("astproperty(setter) is indexed? : " + isIndexedAccess() + " child: " + _children[0].getClass().getName()
-          //      + " target: " + target.getClass().getName());
-        
+        //      + " target: " + target.getClass().getName());
+
         try {
-            
+
             if (isIndexedAccess()) {
-                
+
                 //System.out.println("ast set source property is indexed");
-                
+
                 Object value = _children[0].getValue(context, context.getRoot());
-                
+
                 if (value == null)
                     throw new UnsupportedCompilationException("Value passed as indexed property is null, can't enhance statement to bytecode.");
-                
+
                 String srcString = _children[0].toGetSourceString(context, context.getRoot());
-                
+
                 srcString = ExpressionCompiler.getRootExpression(_children[0], context.getRoot(), context) + srcString;
-                
+
                 if (!ASTConst.class.isInstance(_children[0])) {
                     String cast = (String)context.remove(ExpressionCompiler.PRE_CAST);
                     if (cast != null)
                 }
 
                 //System.out.println("astproperty setter using indexed value " + value + " and srcString: " + srcString);
-                
+
                 if (context.get("_indexedMethod") != null) {
-                    
+
                     m = (Method)context.remove("_indexedMethod");
-                    
+
                     _setterClass = m.getParameterTypes()[0];
 
                     context.setCurrentType(_setterClass);
                     context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
                     context.setCurrentObject(target);
-                    
+
                     return m.getName() + "(" + srcString + ")";
                 } else {
                     PropertyAccessor p = OgnlRuntime.getPropertyAccessor(target.getClass());
                         context.setCurrentType(OgnlRuntime.getPrimitiveWrapperClass(context.getCurrentObject().getClass()));
 
                     result = p.getSourceSetter(context, target, srcString);
-                    
+
                     context.setCurrentObject(value);
                     context.setCurrentType(_getterClass);
                     return result;
                 }
             }
-            
+
             String name = ((ASTConst) _children[0]).getValue().toString();
-            
+
             //System.out.println(" astprop(setter) : trying to set " + name + " on object target " + context.getCurrentObject().getClass().getName());
-            
-            if (!Iterator.class.isAssignableFrom(context.getCurrentObject().getClass()) 
-                    || (Iterator.class.isAssignableFrom(context.getCurrentObject().getClass()) &&  name.indexOf("next") < 0)) {
+
+            if (!Iterator.class.isAssignableFrom(context.getCurrentObject().getClass())
+                || (Iterator.class.isAssignableFrom(context.getCurrentObject().getClass()) &&  name.indexOf("next") < 0)) {
 
                 Object currObj = target;
 
                     target = getValue(context, context.getCurrentObject());
                 } catch (NoSuchPropertyException e) {
                     try {
-                        
+
                         target = getValue(context, context.getRoot());
-                        
+
                     } catch (NoSuchPropertyException ex) { }
                 } finally {
 
                     context.setCurrentObject(currObj);
                 }
             }
-            
+
             PropertyDescriptor pd = OgnlRuntime.getPropertyDescriptor(OgnlRuntime.getCompiler().getInterfaceClass(context.getCurrentObject().getClass()), name);
-            
+
             if (pd != null && this.getIndexedPropertyType(context, context.getCurrentObject()) > 0){
-                
+
                 // if an indexed method accessor need to use special property descriptors to find methods
-                
+
                 if (pd instanceof IndexedPropertyDescriptor) {
                     IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor)pd;
-                    
+
                     m = lastChild(context) ? ipd.getIndexedWriteMethod() : ipd.getIndexedReadMethod();
                 } else {
                     if (pd instanceof ObjectIndexedPropertyDescriptor) {
                         ObjectIndexedPropertyDescriptor opd = (ObjectIndexedPropertyDescriptor)pd;
-                        
+
                         m = lastChild(context) ? opd.getIndexedWriteMethod() : opd.getIndexedReadMethod();
                     } else {
                         throw new OgnlException("property '" + name + "' is not an indexed property");
                     }
                 }
-                
+
                 if (_parent == null) {
                     // the above pd will be the wrong result sometimes, such as methods like getValue(int) vs String[] getValue() 
-                    
+
                     m = OgnlRuntime.getWriteMethod(context.getCurrentObject().getClass(), name);
                     Class parm = m.getParameterTypes()[0];
                     String cast = parm.isArray() ? ExpressionCompiler.getCastString(parm) : parm.getName();
-                    
+
                     result = m.getName() + "((" + cast + ")$3)";
                     _setterClass = parm;
                 } else {
                     context.put("_indexedMethod", m);
                 }
-                
+
             } else {
-                
+
                 // System.out.println("astproperty trying to set " + name + " on object target: " + context.getCurrentObject().getClass().getName());
-                
+
                 PropertyAccessor pa = OgnlRuntime.getPropertyAccessor(context.getCurrentObject().getClass());
-                
+
                 if (target != null)
                     _setterClass = target.getClass();
-                
+
                 if (_parent != null && pd != null && pa == null) {
-                    
+
                     m = pd.getReadMethod();
                     result = m.getName() + "()";
                 } else {
-                    
+
                     if (context.getCurrentObject().getClass().isArray()) {
                         result = "";
                     } else if (pa != null) {
                         //Class prevType = context.getPreviousType();
 
                         String srcString = _children[0].toGetSourceString(context, context.getRoot());
-                        
+
                         if (ASTConst.class.isInstance(_children[0]) && String.class.isInstance(context.getCurrentObject())) {
                             srcString = "\"" + srcString + "\"";
                         }
 
                             result = pa.getSourceAccessor(context, context.getCurrentObject(), srcString);
                         } else {
-                            
+
                             result = pa.getSourceSetter(context, context.getCurrentObject(), srcString);
                         }
 
                         _getterClass = context.getCurrentType();
-                    } 
+                    }
                 }
             }
-            
+
         } catch (Throwable t) {
             if (UnsupportedCompilationException.class.isInstance(t))
                 throw (UnsupportedCompilationException)t;
         }
 
         context.setCurrentObject(target);
-        
+
         if (m != null) {
-            
+
             context.setCurrentType(m.getReturnType());
             context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
         }

src/java/ognl/MethodAccessor.java

  */
 public interface MethodAccessor
 {
-      /**
-       * Calls the static method named with the arguments given on the class given.
-       * @param context     expression context in which the method should be called
-       * @param targetClass the object in which the method exists
-       * @param methodName  the name of the method
-       * @param args        the arguments to the method
-       * @result            result of calling the method
-       * @exception MethodFailedException if there is an error calling the method
-       */
-    Object callStaticMethod( Map context, Class targetClass, String methodName, Object[] args ) throws MethodFailedException;
+    /**
+     * Calls the static method named with the arguments given on the class given.
+     * @param context     expression context in which the method should be called
+     * @param targetClass the object in which the method exists
+     * @param methodName  the name of the method
+     * @param args        the arguments to the method
+     *
+     * @return            result of calling the method
+     * @exception MethodFailedException if there is an error calling the method
+     */
+    Object callStaticMethod( Map context, Class targetClass, String methodName, Object[] args )
+            throws MethodFailedException;
 
-      /**
-       * Calls the method named with the arguments given.
-       * @param context     expression context in which the method should be called
-       * @param target      the object in which the method exists
-       * @param methodName  the name of the method
-       * @param args        the arguments to the method
-       * @result            result of calling the method
-       * @exception MethodFailedException if there is an error calling the method
-       */
-    Object callMethod( Map context, Object target, String methodName, Object[] args ) throws MethodFailedException;
+    /**
+     * Calls the method named with the arguments given.
+     * @param context     expression context in which the method should be called
+     * @param target      the object in which the method exists
+     * @param methodName  the name of the method
+     * @param args        the arguments to the method
+     * @return            result of calling the method
+     * @exception MethodFailedException if there is an error calling the method
+     */
+    Object callMethod( Map context, Object target, String methodName, Object[] args )
+            throws MethodFailedException;
 }

src/java/ognl/ObjectPropertyAccessor.java

             String methodName = index.toString().replaceAll("\"", "");
             
             Method m = OgnlRuntime.getReadMethod(target.getClass(), methodName);
-
             // try to get field if no method could be found 
 
             if (m == null) {

src/java/ognl/enhance/ExpressionCompiler.java

             Class castClass = OgnlRuntime.getCompiler().getRootExpressionClass(expression, context);
 
             if (castClass.isArray() || ASTRootVarRef.class.isInstance(expression)
-                || ASTThisVarRef.class.isInstance(expression)) {
-
+                || ASTThisVarRef.class.isInstance(expression))
+            {
                 rootExpr = "((" + getCastString(castClass) + ")$2)";
 
                 if (ASTProperty.class.isInstance(expression) && !((ASTProperty) expression).isIndexedAccess())
                     rootExpr += ".";
             } else if ((ASTProperty.class.isInstance(expression)
                         && ((ASTProperty) expression).isIndexedAccess())
-                       || ASTChain.class.isInstance(expression)) {
-
-                rootExpr = "((" + OgnlRuntime.getCompiler().getClassName(castClass) + ")$2)";
-            } else {
-
-                rootExpr = "((" + OgnlRuntime.getCompiler().getClassName(castClass) + ")$2).";
+                       || ASTChain.class.isInstance(expression))
+            {
+                rootExpr = "((" + getCastString(castClass) + ")$2)";
+            } else
+            {
+                rootExpr = "((" + getCastString(castClass) + ")$2).";
             }
         }
 
     {
         // ok - so this looks really f-ed up ...and it is ..eh if you can do it better I'm all for it :)
 
-        
-
         if (context.getCurrentAccessor() == null
             || context.getPreviousType() == null
             || context.getCurrentAccessor().isAssignableFrom(context.getPreviousType())
 
         body = body.replaceAll("\\.\\.", ".");
 
-//        System.out.println("Getter Body: ===================================\n" + body);
+        //System.out.println("Getter Body: ===================================\n" + body);
         valueGetter.setBody(body);
         newClass.addMethod(valueGetter);
 

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

             {INDEXED, "source.total", 1},
             {ROOT, "indexer.line[index]", "line:1"},
             {INDEXED, "list[2].longValue()", new Long(3)},
-            {ROOT, "map.value.id", new Long(1)}
+            {ROOT, "map.value.id", new Long(1)},
     };
 
     /*

src/test/java/org/ognl/test/MethodTest.java

             { "getValueIsTrue(!false) ? \"\" : \"here\" ", ""},
             { "messages.format('ShowAllCount', one)", "foo"},
             { "getTestValue(@org.ognl.test.objects.SimpleEnum@ONE.value)", new Integer(2)},
-            { "@org.ognl.test.MethodTest@getA().isProperty()", Boolean.FALSE}
+            { "@org.ognl.test.MethodTest@getA().isProperty()", Boolean.FALSE},
+            { "isDisabled()", Boolean.TRUE},
+            { "isEditorDisabled()", Boolean.FALSE},
     };
 
     public static class A

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

             { ROOT, "printDelivery ? 'javascript:toggle(' + bean2.id + ');' : ''", "javascript:toggle(1);"},
             { ROOT, "openTransitionWin", Boolean.FALSE},
             { ROOT, "b.methodOfB(a.methodOfA(b)-1)", new Integer(0)},
+            { ROOT, "disabled", Boolean.TRUE},
     };
 
     public static String formatValue(int millis, boolean b1, boolean b2)

src/test/java/org/ognl/test/enhance/TestExpressionCompiler.java

 import org.ognl.test.objects.*;
 
 import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
  * Tests functionality of {@link ExpressionCompiler}.
- * 
- * @author jkuhnert
  */
 public class TestExpressionCompiler extends TestCase
 {
         assertNotNull(ret);
         assertTrue(Collection.class.isAssignableFrom(ret.getClass()));
     }
+
+    public String getKey()
+    {
+        return "key";
+    }
+
+    public void test_Indexed_Property()
+    throws Throwable
+    {
+        Map map = new HashMap();
+        map.put("key", "value");
+        
+        Node expression = Ognl.compileExpression(_context, this, "key");
+        assertEquals("key", expression.getAccessor().get(_context, this));
+    }
 }

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

         return list;
     }
 
+    public boolean isEditorDisabled()
+    {
+        return false;
+    }
+
+    public boolean isDisabled()
+    {
+        return true;
+    }
+
     public boolean isOpenTransitionWin()
     {
         return _openWindow;

src/test/java/org/ognl/test/objects/Simple.java

         return val + 1;
     }
 
+    public boolean isEditorDisabled()
+    {
+        return false;
+    }
+
+    public boolean isDisabled()
+    {
+        return true;
+    }
+
     public boolean equals(Object other)
     {
         boolean     result = false;