Commits

jkuh...@d4b077e3-5828-0410-b394-cb2b42183085  committed 3c0b185

Fixes OGNL-91. God that bug sucked ass.... Finally did numeric coercion refactoring whether I liked it or not.

  • Participants
  • Parent commits 8256d97

Comments (0)

Files changed (13)

   <component name="DependenciesAnalyzeManager">
     <option name="myForwardDirection" value="false" />
   </component>
+  <component name="DependencyValidationManager">
+    <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+  </component>
   <component name="EclipseCompilerSettings">
     <option name="DEBUGGING_INFO" value="true" />
     <option name="GENERATE_NO_WARNINGS" value="true" />
   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTBitAnd.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTBitAnd.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ComparisonExpression.java" afterPath="$PROJECT_DIR$/src/java/ognl/ComparisonExpression.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OGNL.ipr" afterPath="$PROJECT_DIR$/OGNL.ipr" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java" afterPath="$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/NumericExpression.java" afterPath="$PROJECT_DIR$/src/java/ognl/NumericExpression.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArithmeticAndLogicalOperatorsTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArithmeticAndLogicalOperatorsTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTUnsignedShiftRight.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTUnsignedShiftRight.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTAdd.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTAdd.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTBitNegate.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTBitNegate.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$/src/java/ognl/ASTNegate.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTNegate.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/enhance/TestExpressionCompiler.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/enhance/TestExpressionCompiler.java" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTList.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTList.java" />
     </list>
   </component>
   <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
     <rightPanel />
     <splitter proportion="0.5" />
   </component>
-  <component name="CompilerWorkspaceConfiguration">
-    <option name="COMPILE_IN_BACKGROUND" value="false" />
-    <option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
-    <option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="true" />
-    <option name="COMPILE_DEPENDENT_FILES" value="false" />
-    <option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
-    <option name="ASSERT_NOT_NULL" value="true" />
-  </component>
   <component name="CreatePatchCommitExecutor">
     <option name="PATCH_PATH" value="" />
     <option name="REVERSE_PATCH" value="false" />
     </subPane>
   </component>
   <component name="FileEditorManager">
-    <leaf>
-      <file leaf-file-name="TestExpressionCompiler.java" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/enhance/TestExpressionCompiler.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="41" column="4" selection-start="942" selection-end="942" vertical-scroll-proportion="0.4237856">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ExpressionCompiler.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/java/ognl/enhance/ExpressionCompiler.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="540" column="34" selection-start="19596" selection-end="19596" vertical-scroll-proportion="0.54941374">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-    </leaf>
+    <leaf />
   </component>
   <component name="FindManager">
     <FindUsagesManager>
     <option name="SORT_ALPHABETICALLY" value="false" />
     <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
   </component>
-  <component name="InspectionManager">
-    <option name="AUTOSCROLL_TO_SOURCE" value="false" />
-    <option name="SPLITTER_PROPORTION" value="0.5" />
-    <option name="GROUP_BY_SEVERITY" value="false" />
-    <option name="FILTER_RESOLVED_ITEMS" value="true" />
-    <option name="ANALYZE_TEST_SOURCES" value="true" />
-    <option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" />
-    <option name="SCOPE_TYPE" value="1" />
-    <option name="CUSTOM_SCOPE_NAME" value="" />
-    <option name="SHOW_ONLY_DIFF" value="false" />
-    <option name="SHOW_STRUCTURE" value="true" />
-    <option name="ANALYSIS_IN_BACKGROUND" value="false" />
-  </component>
   <component name="ModuleEditorState">
     <option name="LAST_EDITED_MODULE_NAME" />
     <option name="LAST_EDITED_TAB_NAME" />
     <subPane>
       <PATH>
         <PATH_ELEMENT>
-          <option name="myItemId" value="com.intellij.openapi.project.impl.ProjectImpl@11a7296" />
+          <option name="myItemId" value="OGNL" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="Module:OGNL" />
+          <option name="myItemId" value="OGNL" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
         </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
-          <option name="myItemId" value="com.intellij.openapi.project.impl.ProjectImpl@11a7296" />
+          <option name="myItemId" value="OGNL" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="Module:OGNL" />
+          <option name="myItemId" value="OGNL" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
     <option name="referencePos" value="0" />
     <option name="showLabels" value="true" />
   </component>
-  <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.*" />
+  <component name="RunManager" selected="JUnit.IndexAccessTest">
+    <tempConfiguration default="false" name="IndexAccessTest" 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.enhance" />
-      <option name="MAIN_CLASS_NAME" value="org.ognl.test.enhance.TestExpressionCompiler" />
+      <option name="PACKAGE_NAME" value="org.ognl.test" />
+      <option name="MAIN_CLASS_NAME" value="org.ognl.test.IndexAccessTest" />
       <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 default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false">
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="SUITE_NAME" value="" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" value="" />
+      <option name="METHOD_NAME" />
+      <option name="GROUP_NAME" value="" />
+      <option name="TEST_OBJECT" value="CLASS" />
+      <option name="VM_PARAMETERS" value="" />
+      <option name="PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/build" />
+      <option name="OUTPUT_DIRECTORY" value="" />
+      <option name="ENV_VARIABLES" />
+      <option name="ADDITIONAL_CLASS_PATH" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="singleModule" />
+      </option>
+      <option name="PROPERTIES_FILE" value="" />
+      <properties />
+      <method>
+        <option name="Make" value="true" />
+      </method>
     </configuration>
     <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <module name="" />
         <option name="Make" value="true" />
       </method>
     </configuration>
-    <configuration default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false">
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" value="" />
-      <option name="SUITE_NAME" value="" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" value="" />
-      <option name="METHOD_NAME" />
-      <option name="GROUP_NAME" value="" />
-      <option name="TEST_OBJECT" value="CLASS" />
-      <option name="VM_PARAMETERS" value="" />
-      <option name="PARAMETERS" value="" />
-      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/build" />
-      <option name="OUTPUT_DIRECTORY" value="" />
-      <option name="ADDITIONAL_CLASS_PATH" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="singleModule" />
-      </option>
-      <option name="PROPERTIES_FILE" value="" />
-      <properties />
-      <method>
-        <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="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" />
       <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.24943718" 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="Maven projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <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.28281462" order="0" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27707583" 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="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="IDEtalk" active="false" anchor="right" 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="Maven projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <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" />
       <window_info id="SVN Properties" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32979593" order="8" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
       <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
+      <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="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="4" />
       <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
     </layout>
     <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-89.  ASTCtor was calling ExpressionCompiler.getRootExpression() on child expression of ASTRootVarRef - which was also doing the same exact thing on itself." />
+    <option name="LAST_COMMIT_MESSAGE" value="Fixes OGNL-91. God that bug sucked ass.... Finally did numeric coercion refactoring whether I liked it or not." />
     <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="ERROR_OCCURED" value="false" />
     <option name="ACTIVE_VCS_NAME" value="svn" />
     <option name="UPDATE_GROUP_BY_PACKAGES" 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-56. Trying to be clever with source strings containg booleans didn't work out.  Used clumsier OgnlOps method instead." />
     <MESSAGE value="Added some more unit tests referenced in jira but could not get them to fail." />
     <MESSAGE value="Fixes OGNL-60 . OgnlOps wasn't converting simple object values to object arrays &amp;&amp; ASTMethod wasn't checking for void return types to parameter values." />
     <MESSAGE value="Fixes OGNL-62. OgnlRuntime.getReadMethod() wasn't checking for a valid return type in the second pass method matcher." />
     <MESSAGE value="Cleaning up source / javadocs / etc in preparation for release.  Tried unsuccessfully to get docbook running happily." />
     <MESSAGE value="Got docbook working finally.  Has to be run with 1.4 jre." />
     <MESSAGE value="Fixes OGNL-89.  ASTCtor was calling ExpressionCompiler.getRootExpression() on child expression of ASTRootVarRef - which was also doing the same exact thing on itself." />
+    <MESSAGE value="Fixes OGNL-91. God that bug sucked ass.... Finally did numeric coercion refactoring whether I liked it or not." />
   </component>
   <component name="VssConfiguration">
     <option name="CLIENT_PATH" value="" />
     <option name="myLastEditedConfigurable" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/extlib/docbook-xsl-1.69.1/html/autotoc.xsl">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAdd.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="317" column="37" selection-start="11636" selection-end="11636" vertical-scroll-proportion="0.34605598">
+        <state line="282" column="19" selection-start="12284" selection-end="12284" vertical-scroll-proportion="1.0857815">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/docbook.properties">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTBitNegate.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="10" column="26" selection-start="476" selection-end="476" vertical-scroll-proportion="0.12562814">
+        <state line="69" column="0" selection-start="2693" selection-end="2693" vertical-scroll-proportion="0.70505285">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/build.xml">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTNegate.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="59" column="0" selection-start="1846" selection-end="1846" vertical-scroll-proportion="0.58100086">
+        <state line="63" column="0" selection-start="2542" selection-end="2542" vertical-scroll-proportion="0.59929496">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/docbook.xml">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlOps.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="139" column="33" selection-start="8569" selection-end="8569" vertical-scroll-proportion="0.27989823">
+        <state line="685" column="36" selection-start="25262" selection-end="25262" vertical-scroll-proportion="0.42068157">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/.ant-targets-build.xml">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTBitAnd.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="17" column="16" selection-start="200" selection-end="200" vertical-scroll-proportion="0.21628499">
+        <state line="62" column="4" selection-start="2518" selection-end="2518" vertical-scroll-proportion="0.5816686">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/www/index.html">
-      <provider editor-type-id="HtmlPreview">
-        <state />
-      </provider>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTUnsignedShiftRight.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="19" column="0" selection-start="765" selection-end="765" vertical-scroll-proportion="0.24718127">
+        <state line="65" column="0" selection-start="2616" selection-end="2616" vertical-scroll-proportion="0.3478261">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/docs/index.html">
-      <provider editor-type-id="HtmlPreview">
-        <state />
-      </provider>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ArithmeticAndLogicalOperatorsTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="22" column="4" selection-start="1254" selection-end="1254" vertical-scroll-proportion="0.28620988">
+        <state line="112" column="37" selection-start="4863" selection-end="4863" vertical-scroll-proportion="0.4522613">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/docbook/DeveloperGuide.xml">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/NumericExpression.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="130" column="1" selection-start="7838" selection-end="7838" vertical-scroll-proportion="0.2766323">
+        <state line="61" column="16" selection-start="1457" selection-end="1457" vertical-scroll-proportion="0.51005024">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/StaticsAndConstructorsTest.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="139" column="0" selection-start="5317" selection-end="5317" vertical-scroll-proportion="0.39698493">
+        <state line="86" column="81" selection-start="5207" selection-end="5207" vertical-scroll-proportion="0.67839193">
           <folding>
             <element signature="imports" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTRootVarRef.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="76" column="0" selection-start="2721" selection-end="2721" vertical-scroll-proportion="0.59045225">
+        <state line="2182" column="8" selection-start="82304" selection-end="82304" vertical-scroll-proportion="0.40305522">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTCtor.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ComparisonExpression.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="224" column="0" selection-start="8337" selection-end="8337" vertical-scroll-proportion="0.3517588">
+        <state line="35" column="34" selection-start="894" selection-end="894" vertical-scroll-proportion="0.5746181">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/CollectionDirectPropertyTest.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTEq.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="60" column="0" selection-start="3311" selection-end="3311" vertical-scroll-proportion="0.3517588">
+        <state line="37" column="31" selection-start="1893" selection-end="1893" vertical-scroll-proportion="0.14101058">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTList.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAnd.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="106" column="65" selection-start="3530" selection-end="3530" vertical-scroll-proportion="0.493537">
+        <state line="110" column="0" selection-start="4014" selection-end="4014" vertical-scroll-proportion="0.2467685">
           <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="55" column="6" selection-start="3173" selection-end="3173" vertical-scroll-proportion="0.2839196">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </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="540" column="34" selection-start="19596" selection-end="19596" vertical-scroll-proportion="0.54941374">
+        <state line="540" column="0" selection-start="19550" selection-end="19550" vertical-scroll-proportion="0.5025126">
           <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="41" column="4" selection-start="942" selection-end="942" vertical-scroll-proportion="0.4237856">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
   </component>
   <component name="testng.defaultConfiguration">
     <outputDirectory />

File src/java/ognl/ASTAdd.java

                                && ASTChain.class.isInstance(_children[i]))
                     {
                         String rootExpr = ExpressionCompiler.getRootExpression(_children[i], context.getRoot(), context);
-                        //System.out.println("astadd rootExpr " + rootExpr + " and expr: " + expr);
 
                         if (!ASTProperty.class.isInstance(_children[i].jjtGetChild(0))
                             && rootExpr.endsWith(")") && expr.startsWith(")"))
                 context.setCurrentType(_getterClass);
             }
 
+            //if (context.getCurrentType() == null)
+              //  context.setCurrentType(Double.TYPE);
+
             return result;
 
         } catch (Throwable t) {

File src/java/ognl/ASTBitAnd.java

     {
         return "&";
     }
+    
+    public String coerceToNumeric(String source, OgnlContext context, Node child)
+    {
+        return "(long)" + super.coerceToNumeric(source, context, child);
+    }
 }

File src/java/ognl/ASTBitNegate.java

     {
         return "~" + _children[0];
     }
+
+    public String toGetSourceString(OgnlContext context, Object target)
+    {
+        String source = _children[0].toGetSourceString(context, target);
+
+        if (!ASTBitNegate.class.isInstance(_children[0]))
+        {
+            return "~(" + super.coerceToNumeric(source, context, _children[0]) + ")";
+        } else
+        {
+            return "~(" + source + ")";
+        }
+    }
 }

File src/java/ognl/ASTNegate.java

     {
         return "-" + _children[0];
     }
+
+    public String toGetSourceString(OgnlContext context, Object target)
+    {
+        String source = _children[0].toGetSourceString(context, target);
+
+        if (!ASTNegate.class.isInstance(_children[0]))
+        {
+            return "-" + source;
+        } else
+        {
+            return "-(" + source + ")";
+        }
+    }
 }

File src/java/ognl/ASTUnsignedShiftRight.java

 //--------------------------------------------------------------------------
 package ognl;
 
+import ognl.enhance.UnsupportedCompilationException;
+
 /**
  * @author Luke Blanshard (blanshlu@netscape.net)
  * @author Drew Davidson (drew@ognl.org)
     {
         return ">>>";
     }
+
+    public String toGetSourceString(OgnlContext context, Object target)
+    {
+        String result = "";
+
+        try {
+
+            String child1 = OgnlRuntime.getChildSource(context, target, _children[0]);
+            child1 = coerceToNumeric(child1, context, _children[0]);
+
+            String child2 = OgnlRuntime.getChildSource(context, target, _children[1]);
+            child2 = coerceToNumeric(child2, context, _children[1]);
+            
+            Object v1 = _children[0].getValue(context, target);
+            int type = OgnlOps.getNumericType(v1);
+
+            if (type <= OgnlOps.INT)
+            {
+                child1 = "(int)" + child1;
+                child2 = "(int)" + child2;
+            }
+
+            result = child1 + " >>> " + child2;
+
+            context.setCurrentType(Integer.TYPE);
+            context.setCurrentObject(getValueBody(context, target));
+
+        } catch (Throwable t) {
+            if (UnsupportedCompilationException.class.isInstance(t))
+                throw (UnsupportedCompilationException)t;
+            else
+                throw new RuntimeException(t);
+        }
+
+        return result;
+    }
 }

File src/java/ognl/ComparisonExpression.java

             // iterate over children to make numeric type detection work properly
             
             OgnlRuntime.getChildSource(context, target, _children[0]);
-            
             OgnlRuntime.getChildSource(context, target, _children[1]);
             
-            //System.out.println("comparison expression currentType: " + context.getCurrentType() + " previousType: " + context.getPreviousType());
-            
+//            System.out.println("comparison expression currentType: " + context.getCurrentType() + " previousType: " + context.getPreviousType());
+
             boolean conversion = OgnlRuntime.shouldConvertNumericTypes(context);
             
             String result = conversion ? "(" + getComparisonFunction() + "( ($w) " : "(";

File src/java/ognl/NumericExpression.java

 
 import ognl.enhance.UnsupportedCompilationException;
 
-import java.math.BigInteger;
-
 
 /**
- * Base class for numeric expressions.
- * 
- * @author jkuhnert
+ * Base class for numeric expressions. 
  */
 public abstract class NumericExpression extends ExpressionNode implements NodeType
 {
     public String toGetSourceString(OgnlContext context, Object target)
     {
         Object value = null;
+        String result = "";
+
         try {
-            
+
             value = getValueBody(context, target);
             
-            if (value != null) 
+            if (value != null)
                 _getterClass = value.getClass();
-            
-            if (ASTConst.class.isInstance(_children[0])) {
-                
-                if (BigInteger.class.isInstance(value) 
-                        && !(_parent != null && NumericExpression.class.isAssignableFrom(_parent.getClass()))) {
-                    
-                    return value.toString();
-                }
-                
-                return value.toString();
+
+            for (int i=0; i < _children.length; i++)
+            {
+                if (i > 0)
+                    result += " " + getExpressionOperator(i) + " ";
+
+                String str = OgnlRuntime.getChildSource(context, target, _children[i]);
+
+                result += coerceToNumeric(str, context, _children[i]);
             }
             
         } catch (Throwable t) {
             else
                 throw new RuntimeException(t);
         }
-        
-        String result = null;
-        
-        if (_parent == null) {
-            
-            if (BigInteger.class.isInstance(value)) {
-                return value.toString();
-            }
-            
-            result = value + OgnlRuntime.getNumericLiteral(_getterClass);
-        } else
-            result = super.toGetSourceString(context, target);
-        
+
         return result;
     }
+
+    public String coerceToNumeric(String source, OgnlContext context, Node child)
+    {
+        String ret = source;
+        Object value = context.getCurrentObject();
+
+        if (ASTConst.class.isInstance(child) && value != null)
+        {
+            return value.toString();
+        }
+
+        if (context.getCurrentType() != null && !context.getCurrentType().isPrimitive()
+            && context.getCurrentObject() != null && Number.class.isInstance(context.getCurrentObject()))
+        {
+            ret = "((" + OgnlRuntime.getCompiler().getClassName(context.getCurrentObject().getClass()) + ")" + ret + ")";
+            ret += "." + OgnlRuntime.getNumericValueGetter(context.getCurrentObject().getClass());
+        } else if (context.getCurrentType() != null && context.getCurrentType().isPrimitive()) {
+            
+            ret += OgnlRuntime.getNumericLiteral(context.getCurrentType());
+        }
+
+        if (NumericExpression.class.isInstance(child))
+            ret = "(" + ret + ")";
+        
+        return ret;
+    }
 }

File src/java/ognl/OgnlRuntime.java

      */
     public static boolean shouldConvertNumericTypes(OgnlContext context)
     {
+        if (context.getCurrentType() == context.getPreviousType())
+            return false;
+        
         return context.getCurrentType() != null && !context.getCurrentType().isArray()
                && context.getPreviousType() != null && !context.getPreviousType().isArray()
                && (!Number.class.isAssignableFrom(context.getCurrentType())

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

         } catch (UnsupportedCompilationException uc) {
 
             //uc.printStackTrace();
-            
+
             if (nodeMember == null)
             {
                 nodeMember = new CtField(nodeClass, "_node", newClass);
 
             body = body.replaceAll("\\.\\.", ".");
 
-            //System.out.println("adding method " + ref.getName() + " with body:\n" + body + " and return type: " + ref.getType());
+//            System.out.println("adding method " + ref.getName() + " with body:\n" + body + " and return type: " + ref.getType());
 
             CtMethod method = new CtMethod(pool.get(getCastString(ref.getType())), ref.getName(), params, clazz);
             method.setBody(body);

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

             // Double-valued arithmetic expressions
             { "-1d", new Double(-1) },
             { "+1d", new Double(1) },
-            { "--1f", new Float(1) },
-            { "2*2.0", new Double(4) },
+            { "--1f", new Double(1) },
+            { "2*2.0", new Double(4.0) },
             { "5/2.", new Double(2.5) },
             { "5+2D", new Double(7) },
             { "5f-2F", new Double(3.0) },
             // BigDecimal-valued arithmetic expressions
             { "-1b", new Integer(-1) },
             { "+1b", new Integer(1) },
-            { "--1b", new Double(1) },
+            { "--1b", new Integer(1) },
             { "2*2.0b", new Double(4.0) }, 
             { "5/2.B", new Integer(2) },
             { "5.0B/2", new Double(2.5) },
             { "5<<2", new Integer(20) },
             { "5>>2", new Integer(1) },
             { "5>>1+1", new Integer(1) },
-            { "-5>>>2", new Integer(-5 >>> 2) },
+            { "-5>>>2", new Integer(-5 >>> 2)},
             { "-5L>>>2", new Long(-5L >>> 2) },
-            { "5. & 3", new Double(1) },
+            { "5. & 3", new Long(1) },
             { "5 ^3", new Integer(6) },
             { "5l&3|5^3", new Long(7) },
-            { "5&(3|5^3)", new Integer(5) },
+            { "5&(3|5^3)", new Long(5) },
             { "true ? 1 : 1/0", new Integer(1) },
 
             // BigInteger-valued arithmetic expressions
             { "5h>>2", Integer.valueOf(1) },
             { "5h>>1+1", Integer.valueOf(1) },
             { "-5h>>>2", Integer.valueOf(-2) },
-            { "5.b & 3", Integer.valueOf(1) },
+            { "5.b & 3", new Long(1) },
             { "5h ^3", Integer.valueOf(6) },
-            { "5h&3|5^3", Integer.valueOf(7) },
-            { "5H&(3|5^3)", Integer.valueOf(5) },
+            { "5h&3|5^3", new Long(7) },
+            { "5H&(3|5^3)", new Long(5) },
 
             // Logical expressions
             { "!1", Boolean.FALSE },
             { "1 and 0", Integer.valueOf(0) },
             { "1 bor 0", new Integer(1) },
             { "true && 12", Integer.valueOf(12)},
-            { "1 xor 0", new Integer(1) }, { "1 band 0", new Integer(0) }, { "1 eq 1", Boolean.TRUE },
+            { "1 xor 0", new Integer(1) }, { "1 band 0", new Long(0) }, { "1 eq 1", Boolean.TRUE },
             { "1 neq 1", Boolean.FALSE }, { "1 lt 5", Boolean.TRUE }, { "1 lte 5", Boolean.TRUE },
             { "1 gt 5", Boolean.FALSE }, { "1 gte 5", Boolean.FALSE }, { "1 lt 5", Boolean.TRUE },
             { "1 shl 2", new Integer(4) }, { "4 shr 2", new Integer(1) }, { "4 ushr 2", new Integer(1) },

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

             { ROOT, "{theInt + 1}", Arrays.asList(new Integer(ROOT.getTheInt() + 1)) },
             { ROOT, " !(printDelivery || @Boolean@FALSE)", Boolean.FALSE},
             { ROOT, "openTransitionWin", Boolean.FALSE},
-            { ROOT, "b.methodOfB(a.methodOfA(b)-1)", new Integer(0)}
+            { ROOT, "b.methodOfB(a.methodOfA(b)-1)", new Integer(0)},
+            { ROOT, "genericIndex-1", new Integer(1)}
     };
 
     public static String formatValue(int millis, boolean b1, boolean b2)