Commits

jkuh...@d4b077e3-5828-0410-b394-cb2b42183085  committed 2fc5ec1

Let's just say it fixes most problems and leave it at that...

  • Participants
  • Parent commits 7c7c582

Comments (0)

Files changed (45)

   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/CollectionDirectPropertyTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/CollectionDirectPropertyTest.java" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/TestOgnlRuntime.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/TestOgnlRuntime.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/TestOgnlRuntime.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/IForm.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTOr.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTOr.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/OgnlOps.java" afterPath="$PROJECT_DIR$/src/java/ognl/OgnlOps.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayElementsTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayElementsTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/IComponent.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ExpressionNode.java" afterPath="$PROJECT_DIR$/src/java/ognl/ExpressionNode.java" />
       <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/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/objects/Indexed.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Indexed.java" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/ListSource.java" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ListPropertyAccessor.java" afterPath="$PROJECT_DIR$/src/java/ognl/ListPropertyAccessor.java" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/ListSourceImpl.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTStaticMethod.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTStaticMethod.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTAssign.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTAssign.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="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/IFormComponent.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/java/ognl/enhance/LocalReference.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTAdd.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTAdd.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/FormImpl.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTVarRef.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTVarRef.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/ComponentImpl.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/InterfaceInheritanceTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/InterfaceInheritanceTest.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/java/ognl/enhance/LocalReferenceImpl.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/enhance/OgnlExpressionCompiler.java" afterPath="$PROJECT_DIR$/src/java/ognl/enhance/OgnlExpressionCompiler.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTMethod.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTMethod.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/NullStringCatenationTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/NullStringCatenationTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/ContextVariableTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/ContextVariableTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTNot.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTNot.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTTest.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTTest.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$/src/java/ognl/BooleanExpression.java" afterPath="$PROJECT_DIR$/src/java/ognl/BooleanExpression.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/OgnlTestCase.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/OgnlTestCase.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTRootVarRef.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTRootVarRef.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/MapCreationTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/MapCreationTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTAnd.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTAnd.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/ClassMethodTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/ClassMethodTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTList.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTList.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/PropertyTest.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/ComponentSubclass.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/test/java/org/ognl/test/MemberAccessTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/MemberAccessTest.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/NumericConversionTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/NumericConversionTest.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/FormComponentImpl.java" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/accessors/ListPropertyAccessorTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/accessors/ListPropertyAccessorTest.java" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTChain.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTChain.java" />
     </list>
   </component>
   <component name="FileEditorManager">
     <leaf>
-      <file leaf-file-name="ExpressionCompiler.java" pinned="false" current="true" current-in-tab="true">
+      <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="82" column="0" selection-start="3419" selection-end="3419" vertical-scroll-proportion="0.3943782">
+            <state line="471" column="11" selection-start="16624" selection-end="16624" vertical-scroll-proportion="0.012787724">
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="IndexedPropertyTest.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/IndexedPropertyTest.java">
+      <file leaf-file-name="OgnlExpressionCompiler.java" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/java/ognl/enhance/OgnlExpressionCompiler.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="55" column="0" selection-start="3050" selection-end="3050" vertical-scroll-proportion="0.31942078">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ASTProperty.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTProperty.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="598" column="54" selection-start="26507" selection-end="26507" vertical-scroll-proportion="0.83390117">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ListPropertyAccessor.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/java/ognl/ListPropertyAccessor.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="185" column="0" selection-start="7094" selection-end="7094" vertical-scroll-proportion="0.41226575">
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ObjectPropertyAccessor.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/java/ognl/ObjectPropertyAccessor.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="266" column="100" selection-start="9833" selection-end="9833" vertical-scroll-proportion="0.770017">
+            <state line="21" column="0" selection-start="377" selection-end="377" vertical-scroll-proportion="0.20460358">
               <folding />
             </state>
           </provider>
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
         </PATH_ELEMENT>
       </PATH>
-      <PATH>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL.ipr" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="OGNL" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
-      </PATH>
     </subPane>
   </component>
   <component name="ProjectReloadState">
       <showLibraryContents />
       <hideEmptyPackages />
       <abbreviatePackageNames />
-      <showStructure ProjectPane="false" PackagesPane="false" Scope="false" Favorites="false" />
+      <showStructure Favorites="false" PackagesPane="false" Scope="false" ProjectPane="false" />
       <autoscrollToSource />
       <autoscrollFromSource />
       <sortByType />
   <component name="ReadonlyStatusHandler">
     <option name="SHOW_DIALOG" value="true" />
   </component>
-  <component name="RecentsManager" />
+  <component name="RecentsManager">
+    <key name="MoveMembersDialog.RECENTS_KEY">
+      <recent name="ognl.enhance.ExpressionCompiler" />
+    </key>
+  </component>
   <component name="RestoreUpdateTree" />
-  <component name="RunManager" selected="JUnit.CollectionDirectPropertyTest">
-    <tempConfiguration default="false" name="CollectionDirectPropertyTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+  <component name="RunManager" selected="JUnit.ContextVariableTest">
+    <tempConfiguration default="false" name="ContextVariableTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <pattern value="org.ognl.test.*" />
       <module name="OGNL" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <option name="ALTERNATIVE_JRE_PATH" />
       <option name="PACKAGE_NAME" value="org.ognl.test" />
-      <option name="MAIN_CLASS_NAME" value="org.ognl.test.CollectionDirectPropertyTest" />
+      <option name="MAIN_CLASS_NAME" value="org.ognl.test.ContextVariableTest" />
       <option name="METHOD_NAME" />
       <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" />
         <option name="Make" value="true" />
       </method>
     </tempConfiguration>
-    <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="METHOD_NAME" />
-      <option name="TEST_OBJECT" value="class" />
-      <option name="VM_PARAMETERS" />
-      <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="ADDITIONAL_CLASS_PATH" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="wholeProject" />
-      </option>
-      <method>
-        <option name="Make" value="true" />
-      </method>
-    </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="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="PROGRAM_PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <module name="" />
-    </configuration>
     <configuration default="true" type="TestNG" factoryName="TestNG" enabled="false" merge="false">
       <module name="" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <ConfigurationWrapper RunnerId="Debug" />
       <ConfigurationWrapper RunnerId="Run" />
     </configuration>
+    <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+      <option name="MAIN_CLASS_NAME" />
+      <option name="VM_PARAMETERS" />
+      <option name="PROGRAM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <module name="" />
+    </configuration>
     <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local">
       <option name="WORKING_DIRECTORY" />
       <option name="HOST" value="localhost" />
         </SHUTDOWN>
       </ConfigurationWrapper>
     </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="JUnit" factoryName="JUnit" enabled="false" merge="false">
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ADDITIONAL_CLASS_PATH" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="wholeProject" />
+      </option>
+      <method>
+        <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 name="&lt;template&gt;" type="WebApp" default="true" selected="false">
       <Host>localhost</Host>
       <Port>5050</Port>
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="91" y="145" width="2112" height="1362" extended-state="0" />
+    <frame x="96" y="160" width="2112" height="1361" extended-state="0" />
     <editor active="false" />
     <layout>
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2746888" order="8" />
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32912457" order="1" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32807308" order="1" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2755187" order="3" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24046434" order="8" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22323652" order="8" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22259136" order="8" />
       <window_info id="Maven" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
       <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
-      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22930866" order="0" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24780916" order="0" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25975105" order="2" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2591362" order="2" />
       <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="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" />
     <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
     <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
-    <option name="LAST_COMMIT_MESSAGE" value="Resolves OGNL-24. ListPropertyAccessor wasn't delegating to superclass for getSource in operations where a list object has been extended .." />
+    <option name="LAST_COMMIT_MESSAGE" value="Let's just say it fixes most problems and leave it at that..." />
     <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
     <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
     <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
     <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
-    <MESSAGE value="Fixes OGNL-17. ...Too much to list, the summary is that ASTCtor / ASTList hadn't had the same kind of context/ refactoring love &#10;that ASTMethod/ property/ etc had ...." />
     <MESSAGE value="Fixes OGNL-18.&#10;&#10;Array/List/etc accessors weren't properly detecting object vs primitive types when accessing their respective properties because ASTConst was still sticking the old object class type as the current context type. This involved refactoring ASTConst to correctly place the native type for numerics as well as fixing all the problems resulting from this new behavior." />
     <MESSAGE value="Fixes OGNL-14 &amp;&amp; OGNL-16. &#10;&#10;OgnlRuntime.getChildSource was still using the old non &quot;($w)&quot; widening casting semantics provided by javassist." />
     <MESSAGE value="Minor update?" />
     <MESSAGE value="Resolves OGNL-22. Null strings weren't being handled properly in mathematical expressions." />
     <MESSAGE value="Resolves OGNL-23. String concatenation not working properly in ternary statements." />
     <MESSAGE value="Resolves OGNL-24. ListPropertyAccessor wasn't delegating to superclass for getSource in operations where a list object has been extended .." />
+    <MESSAGE value="Let's just say it fixes most problems and leave it at that..." />
   </component>
   <component name="antWorkspaceConfiguration">
     <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
     <option name="myLastEditedConfigurable" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Indexed.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlOps.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="40" column="41" selection-start="1989" selection-end="1989" vertical-scroll-proportion="0.15807962">
+        <state line="990" column="0" selection-start="35200" selection-end="35200" vertical-scroll-proportion="0.82435596">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/accessors/ListPropertyAccessorTest.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/BooleanExpression.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="67" column="0" selection-start="2308" selection-end="2308" vertical-scroll-proportion="1.0187354">
+        <state line="53" column="42" selection-start="1214" selection-end="1214" vertical-scroll-proportion="0.56088996">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="jar:///usr/local/jdk1.5.0_11/src.zip!/java/security/Permission.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="14" column="3" selection-start="454" selection-end="454" vertical-scroll-proportion="0.15807962">
+        <state line="2124" column="0" selection-start="81539" selection-end="81539" vertical-scroll-proportion="0.47775176">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="jar:///usr/local/jdk1.5.0_11/src.zip!/java/lang/SecurityManager.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAnd.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="512" column="41" selection-start="20490" selection-end="20490" vertical-scroll-proportion="0.22014052">
+        <state line="107" column="0" selection-start="4065" selection-end="4065" vertical-scroll-proportion="0.4566745">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ArrayElementsTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="58" column="72" selection-start="2959" selection-end="2959" vertical-scroll-proportion="0.36885247">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTRootVarRef.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="79" column="12" selection-start="2838" selection-end="2838" vertical-scroll-proportion="0.87822014">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTOr.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="112" column="0" selection-start="4219" selection-end="4219" vertical-scroll-proportion="0.07025761">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/CollectionDirectPropertyTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="61" column="0" selection-start="3318" selection-end="3318" vertical-scroll-proportion="0.3705281">
+        <state line="39" column="42" selection-start="1953" selection-end="1953" vertical-scroll-proportion="0.08951407">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ListPropertyAccessor.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ContextVariableTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="185" column="0" selection-start="7094" selection-end="7094" vertical-scroll-proportion="0.41226575">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTProperty.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="598" column="54" selection-start="26507" selection-end="26507" vertical-scroll-proportion="0.83390117">
+        <state line="45" column="0" selection-start="2247" selection-end="2247" vertical-scroll-proportion="0.19181585">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTStaticMethod.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ShortCircuitingExpressionTest.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="177" column="62" selection-start="6713" selection-end="6713" vertical-scroll-proportion="0.21492206">
+        <state line="45" column="46" selection-start="2400" selection-end="2400" vertical-scroll-proportion="0.17902814">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTMethod.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTVarRef.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="392" column="50" selection-start="15305" selection-end="15305" vertical-scroll-proportion="0.7995546">
+        <state line="115" column="8" selection-start="3461" selection-end="3461" vertical-scroll-proportion="0.59079283">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ObjectPropertyAccessor.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAssign.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="266" column="100" selection-start="9833" selection-end="9833" vertical-scroll-proportion="0.770017">
+        <state line="101" column="15" selection-start="4133" selection-end="4133" vertical-scroll-proportion="0.45012787">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java">
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTSequence.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="2017" column="35" selection-start="77132" selection-end="77132" vertical-scroll-proportion="34.666275">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/TestOgnlRuntime.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="24" column="0" selection-start="671" selection-end="671" vertical-scroll-proportion="0.30664396">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </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="54" column="6" selection-start="3109" selection-end="3109" vertical-scroll-proportion="0.2810903">
-          <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="55" column="0" selection-start="3050" selection-end="3050" vertical-scroll-proportion="0.31942078">
+        <state line="143" column="12" selection-start="4962" selection-end="4962" vertical-scroll-proportion="0.67689687">
           <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="82" column="0" selection-start="3419" selection-end="3419" vertical-scroll-proportion="0.3943782">
+        <state line="471" column="11" selection-start="16624" selection-end="16624" vertical-scroll-proportion="0.012787724">
+          <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="21" column="0" selection-start="377" selection-end="377" vertical-scroll-proportion="0.20460358">
           <folding />
         </state>
       </provider>
   <component name="testng.defaultConfiguration">
     <outputDirectory />
     <properties />
+    <groups />
   </component>
 </project>
 

File src/java/ognl/ASTAdd.java

                         }
                     }
 
+                    // turn quoted characters into quoted strings
+                    if (context.getCurrentType() != null && context.getCurrentType() == Character.class
+                            && ASTConst.class.isInstance(_children[i])) {
+                        expr = expr.replaceAll("'", "\"");
+                    }
+
                     if (!OrderedReturn.class.isInstance(_parent)) {
                         result += "(";
                     }
+                    
                     result += expr;
                     
                     if ((lastType == null || !String.class.isAssignableFrom(lastType.getGetterClass()))

File src/java/ognl/ASTAnd.java

         if (_children.length != 2)
             throw new UnsupportedCompilationException("Can only compile boolean expressions with two children.");
         
-        String result = "";
+        String result = "(";
         
         try {
             
             String first = OgnlRuntime.getChildSource(context, target, _children[0]);
-            
+            if (!OgnlRuntime.isBoolean(first))
+                first = OgnlRuntime.getCompiler().createLocalReference(context, first, context.getCurrentType());
+
+            Class firstType = context.getCurrentType();
+
             String second = OgnlRuntime.getChildSource(context, target, _children[1]);
-            
-            result += "(ognl.OgnlOps.booleanValue(" + first + ")";
+            if (!OgnlRuntime.isBoolean(second))
+                second = OgnlRuntime.getCompiler().createLocalReference(context, second, context.getCurrentType());
+
+            Class secondType = context.getCurrentType();
+
+            boolean mismatched = (firstType.isPrimitive() && !secondType.isPrimitive())
+                                            || (!firstType.isPrimitive() && secondType.isPrimitive()) ? true : false;            
+
+            result += "ognl.OgnlOps.booleanValue(" + first + ")";
             
             result += " ? ";
-            
-            result += second;
+
+            result += (mismatched ? " ($w) " : "") + second;
             result += " : ";
-            
-            result += first;
-            
+
+            result += (mismatched ? " ($w) " : "") + first;
+
             result += ")";
-            
-            result += "";
-            
+
             context.setCurrentObject(target);
-            
             context.setCurrentType(Boolean.TYPE);
         } catch (NullPointerException e) {
             
             
             String second = ExpressionCompiler.getRootExpression(_children[1], context.getRoot(), false) 
             + pre + _children[1].toSetSourceString(context, target);
-            
-            result += "if(ognl.OgnlOps.booleanValue(" + first + ")){";
+
+            if (!OgnlRuntime.isBoolean(first))
+                result += "if(ognl.OgnlOps.booleanValue(" + first + ")){";
+            else
+                result += "if(" + first + "){";
             
             result += second;
             result += "; } ";

File src/java/ognl/ASTAssign.java

 //--------------------------------------------------------------------------
 package ognl;
 
+import ognl.enhance.OrderedReturn;
 import ognl.enhance.UnsupportedCompilationException;
 
 /**
     public String toGetSourceString(OgnlContext context, Object target)
     {
         String result = "";
-        
-        result += _children[0].toGetSourceString(context, target);
+
+        String first = _children[0].toGetSourceString(context, target);
+        String second = "";
         
         if (ASTProperty.class.isInstance(_children[1])) {
-            result += "((" + OgnlRuntime.getCompiler().getClassName(target.getClass()) + ")$2).";
+            second += "((" + OgnlRuntime.getCompiler().getClassName(target.getClass()) + ")$2).";
         }
         
-        String value =_children[1].toGetSourceString(context, target);
-        
-        if (value == null)
-            throw new UnsupportedCompilationException("Value for assignment is null, can't enhance statement to bytecode.");
+        second += _children[1].toGetSourceString(context, target);
         
         if (ASTSequence.class.isAssignableFrom(_children[1].getClass())) {
             ASTSequence seq = (ASTSequence)_children[1];
-            result = seq.getCoreExpression() + result;
-            value = seq.getLastExpression();
+
+            context.setCurrentType(Object.class);
+
+            String core = seq.getCoreExpression();
+            if (core.endsWith(";"))
+                core = core.substring(0, core.lastIndexOf(";"));
+
+            second = OgnlRuntime.getCompiler().createLocalReference(context,
+                    "ognl.OgnlOps.returnValue(($w)" + core  + ", ($w) " + seq.getLastExpression() + ")",
+                    Object.class);
+        }
+
+        if (NodeType.class.isInstance(_children[1])
+                && !ASTProperty.class.isInstance(_children[1])
+                && ((NodeType)_children[1]).getGetterClass() != null && !OrderedReturn.class.isInstance(_children[1])) {
+            
+            second = "new " + ((NodeType)_children[1]).getGetterClass().getName() + "(" + second + ")";
         }
         
-        if (NodeType.class.isInstance(_children[1]) 
-                && !ASTProperty.class.isInstance(_children[1])
-                && ((NodeType)_children[1]).getGetterClass() != null) {
-            
-            value = "new " + ((NodeType)_children[1]).getGetterClass().getName() + "(" + value + ")";
+        if (OrderedReturn.class.isAssignableFrom(_children[0].getClass())
+            && ((OrderedReturn)_children[0]).getCoreExpression() != null) {
+            context.setCurrentType(Object.class);
+
+            result = first + second + ")";
+
+            // System.out.println("building ordered ret from child[0] with result of:" + result);
+
+            result = OgnlRuntime.getCompiler().createLocalReference(context,
+                    "ognl.OgnlOps.returnValue(($w)" + result + ", ($w)" + ((OrderedReturn)_children[0]).getLastExpression() + ")",
+                    Object.class);
         }
-        
-        return result + value + ")";
+
+        return result;
     }
     
     public String toSetSourceString(OgnlContext context, Object target)

File src/java/ognl/ASTChain.java

     
     public String toGetSourceString(OgnlContext context, Object target)
     {
-        if (target == null)
-            throw new UnsupportedCompilationException("Eval expressions not supported as native java yet.");
-        
         String prevChain = (String)context.get("_currentChain");
         
-        context.setCurrentObject(target);
-        context.setCurrentType(target.getClass());
+        if (target != null) {
+            context.setCurrentObject(target);
+            context.setCurrentType(target.getClass());
+        }
         
         String result = "";
         NodeType _lastType = null;
                     
                     String value = _children[i].toGetSourceString(context, context.getCurrentObject());
                     
-                    //System.out.println("astchain child returned >>  " + value + "  <<");
+                    // System.out.println("astchain child returned >>  " + value + "  <<");
                     
                     if (ASTCtor.class.isInstance(_children[i]))
                         constructor = true;
                     }
 
                     //System.out.println("Astchain i: " + i + " currentobj : " + context.getCurrentObject() + " and root: " + context.getRoot());
-                    if (!constructor && !(OrderedReturn.class.isInstance(_children[i]) && ((OrderedReturn)_children[i]).getLastExpression() != null)
+                    if (!ASTVarRef.class.isInstance(_children[i]) && !constructor && !(OrderedReturn.class.isInstance(_children[i]) && ((OrderedReturn)_children[i]).getLastExpression() != null)
                             && (_parent == null || !ASTSequence.class.isInstance(_parent))) {
                         
                         value = OgnlRuntime.getCompiler().castExpression(context, _children[i], value);
                         result = value;
                     } else
                         result += value;
-                    
+
                     context.put("_currentChain", result);
                 }
             }
     
     public String toSetSourceString(OgnlContext context, Object target)
     {
-        if (target == null)
-            throw new UnsupportedCompilationException("Must have valid target object to compile chain.");
-        
         String prevChain = (String)context.get("_currentChain");
         String prevChild = (String)context.get("_lastChild");
         
         if (prevChain != null)
             throw new UnsupportedCompilationException("Can't compile nested chain expressions.");
         
-        context.setCurrentObject(target);
-        context.setCurrentType(target.getClass());
-        context.setCurrentAccessor(target.getClass());
-        
+        if (target != null) {
+            context.setCurrentObject(target);
+            context.setCurrentType(target.getClass());
+        }
+
         String result = "";
         NodeType _lastType = null;
         boolean constructor = false;
         try {
             if ((_children != null) && (_children.length > 0)) {
                 for(int i = 0; i < _children.length; i++) {
-                    //System.out.println("astchain setsource child : " + _children[i].getClass().getName());
+                    // System.out.println("astchain setsource child : " + _children[i].getClass().getName());
                     
                     if (i == (_children.length -1)) {
                         
                         value = OgnlRuntime.getCompiler().castExpression(context, _children[i], value);
                     }
                     
-                    if (ASTOr.class.isInstance(_children[i]) 
+                    if (ASTOr.class.isInstance(_children[i])
                             || ASTAnd.class.isInstance(_children[i])
                             || ASTCtor.class.isInstance(_children[i])
                             || ASTStaticField.class.isInstance(_children[i])) {

File src/java/ognl/ASTList.java

 
                     if (valueClass != null && ctorClass.isArray()) {
 
-                        value = "(" + ExpressionCompiler.getCastString(ctorClass)
+                        value = OgnlRuntime.getCompiler().createLocalReference(context,
+                                "(" + ExpressionCompiler.getCastString(ctorClass)
                                 + ")ognl.OgnlOps.toArray(" + value + ", " + ctorClass.getComponentType().getName()
-                                + ".class, true)";
+                                + ".class, true)",
+                                ctorClass
+                        );
 
                     } else  if (ctorClass.isPrimitive()) {
 
                         Class wrapClass = OgnlRuntime.getPrimitiveWrapperClass(ctorClass);
-
-                        value = "((" + wrapClass.getName()
+                        
+                        value = OgnlRuntime.getCompiler().createLocalReference(context,
+                                "((" + wrapClass.getName()
                                 + ")ognl.OgnlOps.convertValue(" + value + ","
                                 + wrapClass.getName() + ".class, true))."
-                                + OgnlRuntime.getNumericValueGetter(wrapClass);
-                        
+                                + OgnlRuntime.getNumericValueGetter(wrapClass),
+                                ctorClass
+                        );
+
                     } else if (ctorClass != Object.class) {
 
-                        value = "(" + ctorClass.getName() + ")ognl.OgnlOps.convertValue(" + value + "," + ctorClass.getName() + ".class)";
+                        value = OgnlRuntime.getCompiler().createLocalReference(context,
+                                "(" + ctorClass.getName() + ")ognl.OgnlOps.convertValue(" + value + "," + ctorClass.getName() + ".class)",
+                                ctorClass
+                        );
+                        
                     } else if ((NodeType.class.isInstance(_children[i])
                                 && ((NodeType)_children[i]).getGetterClass() != null
                                 && Number.class.isAssignableFrom(((NodeType)_children[i]).getGetterClass()))
 
         context.setCurrentType(List.class);
         context.setCurrentAccessor(List.class);
-        
-        /*
-        if (_parent == null || !ASTCtor.class.isInstance(_parent))
-            return result + " })";
-        else
-            return result + " }";
-            */
 
         result += "}";
-
+        
         if (!array)
             result += ")";
         

File src/java/ognl/ASTMethod.java

                 if (m != null) {
                     
                     context.setCurrentType(m.getReturnType());
-                    context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+                    context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
                     
                     _coreExpression = toSetSourceString(context, target);
                     if (_coreExpression == null || _coreExpression.length() < 1)
                         valueClass = ((NodeType)_children[i]).getGetterClass();
 
                     if (valueClass != parms[i]) {
+                        
+                        if (parms[i].isArray()) {
 
-                        if (parms[i].isArray()) {
-                            
-                            parmString = "(" + ExpressionCompiler.getCastString(parms[i])
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "(" + ExpressionCompiler.getCastString(parms[i])
                                     + ")ognl.OgnlOps.toArray(" + parmString + ", " + parms[i].getComponentType().getName()
-                                    + ".class, true)";
+                                    + ".class, true)",
+                                    parms[i]
+                            );
                             
                         } else  if (parms[i].isPrimitive()) {
                             
                             Class wrapClass = OgnlRuntime.getPrimitiveWrapperClass(parms[i]);
                             
-                            parmString = "((" + wrapClass.getName() 
-                            + ")ognl.OgnlOps.convertValue(" + parmString + "," 
-                            + wrapClass.getName() + ".class, true))."
-                            + OgnlRuntime.getNumericValueGetter(wrapClass);
-                            
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "((" + wrapClass.getName()
+                                    + ")ognl.OgnlOps.convertValue(" + parmString + ","
+                                    + wrapClass.getName() + ".class, true))."
+                                    + OgnlRuntime.getNumericValueGetter(wrapClass),
+                                    parms[i]
+                            );
+
                         } else if (parms[i] != Object.class) {
-                            
-                            parmString = "(" + parms[i].getName() + ")ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)";
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "(" + parms[i].getName() + ")ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)",
+                                    parms[i]
+                            );
                         } else if ((NodeType.class.isInstance(_children[i])
                                 && ((NodeType)_children[i]).getGetterClass() != null 
                                 && Number.class.isAssignableFrom(((NodeType)_children[i]).getGetterClass()))
         }
         
         context.setCurrentType(m.getReturnType());
-        context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+        context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
         
         return result;
     }
                     if (valueClass != parms[i]) {
                         
                         if (parms[i].isArray()) {
-                            
-                            parmString = "(" + ExpressionCompiler.getCastString(parms[i])
+
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "(" + ExpressionCompiler.getCastString(parms[i])
                                     + ")ognl.OgnlOps.toArray(" + parmString + ", " + parms[i].getComponentType().getName()
-                                    + ".class)";
-                            
+                                    + ".class)",
+                                    parms[i]
+                            );
+
                         } else  if (parms[i].isPrimitive()) {
                             
                             Class wrapClass = OgnlRuntime.getPrimitiveWrapperClass(parms[i]);
                             
-                            parmString = "((" + wrapClass.getName() 
-                            + ")ognl.OgnlOps.convertValue(" + parmString + "," 
-                            + wrapClass.getName() + ".class, true))."
-                            + OgnlRuntime.getNumericValueGetter(wrapClass);
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "((" + wrapClass.getName()
+                                    + ")ognl.OgnlOps.convertValue(" + parmString + ","
+                                    + wrapClass.getName() + ".class, true))."
+                                    + OgnlRuntime.getNumericValueGetter(wrapClass),
+                                    parms[i]
+                            );
+                            
                         } else if (parms[i] != Object.class) {
+
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "(" + parms[i].getName() + ")ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)",
+                                    parms[i]
+                            );
                             
-                            parmString = "(" + parms[i].getName() + ")ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)";
                         } else if ((NodeType.class.isInstance(_children[i])
                                 && ((NodeType)_children[i]).getGetterClass() != null
                                 && Number.class.isAssignableFrom(((NodeType)_children[i]).getGetterClass()))
         }
         
         context.setCurrentType(m.getReturnType());
-        context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+        context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
         
         return result + ")" + post;
     }

File src/java/ognl/ASTNot.java

             if (srcString == null || srcString.trim().length() < 1)
                 srcString = "null";
             
-            if (context.getCurrentType() != null && context.getCurrentType() == Boolean.TYPE)
+            if (context.getCurrentType() != null && context.getCurrentType() == Boolean.TYPE
+                    || OgnlRuntime.isBoolean(srcString)) {
+
                 return "!" + srcString;
-            else
-                return "!ognl.OgnlOps.booleanValue(" + srcString + ")";
+            }
+            
+            return "!ognl.OgnlOps.booleanValue(" + srcString + ")";
             
         } catch (Throwable t) {
             if (UnsupportedCompilationException.class.isInstance(t))

File src/java/ognl/ASTOr.java

  * @author Luke Blanshard (blanshlu@netscape.net)
  * @author Drew Davidson (drew@ognl.org)
  */
-public class ASTOr extends BooleanExpression
-{
-    public ASTOr(int id) {
+public class ASTOr extends BooleanExpression {
+    public ASTOr(int id)
+    {
         super(id);
     }
 
-    public ASTOr(OgnlParser p, int id) {
+    public ASTOr(OgnlParser p, int id)
+    {
         super(p, id);
     }
 
-    public void jjtClose() {
+    public void jjtClose()
+    {
         flattenTree();
     }
 
-    protected Object getValueBody( OgnlContext context, Object source ) throws OgnlException
+    protected Object getValueBody(OgnlContext context, Object source) throws OgnlException
     {
         Object result = null;
         int last = _children.length - 1;
-        for ( int i=0; i <= last; ++i ) {
-            result = _children[i].getValue( context, source );
-            if ( i != last && OgnlOps.booleanValue(result) )
+        for (int i = 0; i <= last; ++i) {
+            result = _children[i].getValue(context, source);
+            if (i != last && OgnlOps.booleanValue(result))
                 break;
         }
         return result;
     }
-    
-    protected void setValueBody( OgnlContext context, Object target, Object value ) throws OgnlException
+
+    protected void setValueBody(OgnlContext context, Object target, Object value) throws OgnlException
     {
         int last = _children.length - 1;
-        for ( int i=0; i < last; ++i ) {
-            Object v = _children[i].getValue( context, target );
-            if ( OgnlOps.booleanValue(v) )
+        for (int i = 0; i < last; ++i) {
+            Object v = _children[i].getValue(context, target);
+            if (OgnlOps.booleanValue(v))
                 return;
         }
-        _children[last].setValue( context, target, value );
+        _children[last].setValue(context, target, value);
     }
-    
+
     public String getExpressionOperator(int index)
     {
         return "||";
     }
-    
+
     public Class getGetterClass()
     {
         return null;
     }
-    
+
     public String toGetSourceString(OgnlContext context, Object target)
     {
         if (_children.length != 2)
             throw new UnsupportedCompilationException("Can only compile boolean expressions with two children.");
-        
-        String result = "";
-        
+
+        String result = "(";
+
         try {
-            
+
             String first = OgnlRuntime.getChildSource(context, target, _children[0]);
-            
+            if (!OgnlRuntime.isBoolean(first))
+                first = OgnlRuntime.getCompiler().createLocalReference(context, first, context.getCurrentType());
+
+            Class firstType = context.getCurrentType();
+
             String second = OgnlRuntime.getChildSource(context, target, _children[1]);
-            
-            result += "(ognl.OgnlOps.booleanValue( ($w) " + first + ")";
-            
+
+            if (!OgnlRuntime.isBoolean(second))
+                second = OgnlRuntime.getCompiler().createLocalReference(context, second, context.getCurrentType());
+
+            Class secondType = context.getCurrentType();
+
+            boolean mismatched = (firstType.isPrimitive() && !secondType.isPrimitive())
+                                || (!firstType.isPrimitive() && secondType.isPrimitive()) ? true : false;
+
+            result += "ognl.OgnlOps.booleanValue(" + first + ")";
+
             result += " ? ";
-            
-            result += " ($w) " + first;
+
+            result += (mismatched ? " ($w) " : "") + first;
+
             result += " : ";
 
-            result +=  " ($w) " + second;
-            
+            result += (mismatched ? " ($w) " : "") + second;
+
             result += ")";
-            
+
             context.setCurrentObject(target);
-            
             context.setCurrentType(Boolean.TYPE);
-            
+
         } catch (Throwable t) {
             if (UnsupportedCompilationException.class.isInstance(t))
-                throw (UnsupportedCompilationException)t;
+                throw (UnsupportedCompilationException) t;
             else
                 throw new RuntimeException(t);
         }
-        
+
         return result;
     }
-    
+
     public String toSetSourceString(OgnlContext context, Object target)
     {
         if (_children.length != 2)
             throw new UnsupportedCompilationException("Can only compile boolean expressions with two children.");
-        
-        String pre = (String)context.get("_currentChain");
+
+        String pre = (String) context.get("_currentChain");
         if (pre == null)
             pre = "";
-        
+
         String result = "";
-        
+
         try {
-            
+
             _children[0].getValue(context, target);
-            
+
             String first = ExpressionCompiler.getRootExpression(_children[0], context.getRoot(), false)
-            + pre + _children[0].toGetSourceString(context, target);
-            
+                           + pre + _children[0].toGetSourceString(context, target);
+            if (!OgnlRuntime.isBoolean(first))
+                first = OgnlRuntime.getCompiler().createLocalReference(context, first, Object.class);
+
             _children[1].getValue(context, target);
             
-            String second = ExpressionCompiler.getRootExpression(_children[1], context.getRoot(), false) 
-            + pre + _children[1].toSetSourceString(context, target);
-            
-            result += "(ognl.OgnlOps.booleanValue(" + first + ")";
-            
+            String second = ExpressionCompiler.getRootExpression(_children[1], context.getRoot(), false)
+                            + pre + _children[1].toSetSourceString(context, target);
+            if (!OgnlRuntime.isBoolean(second))
+                second = OgnlRuntime.getCompiler().createLocalReference(context, second, context.getCurrentType());
+
+            result += "ognl.OgnlOps.booleanValue(" + first + ")";
+
             result += " ? ";
 
             result += first;
             result += " : ";
 
             result += second;
-            
-            result += ")";
-            
+
             context.setCurrentObject(target);
-            
+
             context.setCurrentType(Boolean.TYPE);
-            
+
         } catch (Throwable t) {
             if (UnsupportedCompilationException.class.isInstance(t))
-                throw (UnsupportedCompilationException)t;
+                throw (UnsupportedCompilationException) t;
             else
                 throw new RuntimeException(t);
         }
-        
+
         return result;
     }
 }

File src/java/ognl/ASTProperty.java

                     context.put("_indexedMethod", m);
                 }
             } else {
-/*
+
+                /*
                 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());
 
                         _getterClass = context.getCurrentType();
 
-                    } else if (pd != null) {
-                        
-                        m = pd.getReadMethod();
-                        result = m.getName() + "()";
-                    } else {
-                        
-                        m = OgnlRuntime.getReadMethod(context.getCurrentObject().getClass(), name);
-                        if (m == null) {
-                            
-                            m = OgnlRuntime.getReadMethod(context.getCurrentObject().getClass(), name);
-                            result = name + "()";
-                        } else {
-                            result = m.getName() + "()";
-                            _getterClass = m.getReturnType();
-                        }
                     }
                 }
                 
             _getterClass = m.getReturnType();
             
             context.setCurrentType(m.getReturnType());
-            context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+            context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
         }
         
         context.setCurrentObject(target);
                     _setterClass = m.getParameterTypes()[0];
 
                     context.setCurrentType(_setterClass);
-                    context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+                    context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
                     context.setCurrentObject(target);
                     
                     return m.getName() + "(" + srcString + ")";
                         }
 
                         _getterClass = context.getCurrentType();
-                    } else if (pd != null) {
-                        
-                        m = pd.getWriteMethod();
-                        if (m != null) {
-                            
-                            result = m.getName() + "(";
-                            Class ptype = m.getParameterTypes()[0];
-                            
-                            if (ptype.isArray()) {
-                                
-                                result += "(" + ExpressionCompiler.getCastString(ptype)
-                                + ")ognl.OgnlOps.convertValue($3," 
-                                + target.getClass().getComponentType().getName() + ".class))";
-                            } else {
-                                
-                                if (ptype.isPrimitive()) {
-                                    
-                                    Class wrapClass = OgnlRuntime.getPrimitiveWrapperClass(ptype);
-                                    
-                                    result += "((" + wrapClass.getName() 
-                                    + ")ognl.OgnlOps.convertValue($3," 
-                                    + wrapClass.getName() + ".class, true))."
-                                    + OgnlRuntime.getNumericValueGetter(wrapClass)
-                                    + ")";
-                                } else
-                                    result += "ognl.OgnlOps.convertValue($3," + ptype.getName() + ".class))";
-                                
-                            }
-                        }
-                        
-                    }
+                    } 
                 }
             }
             
             else
                 throw new RuntimeException(t);
         }
-        
+
         context.setCurrentObject(target);
         
         if (m != null) {
             
             context.setCurrentType(m.getReturnType());
-            context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+            context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
         }
 
         return result;

File src/java/ognl/ASTRootVarRef.java

             
             context.setCurrentType(_getterClass);
         }
-        
+
         if (_parent == null || (_getterClass != null && _getterClass.isArray()))
             return "";
         else

File src/java/ognl/ASTStaticMethod.java

 
                         if (parms[i].isArray()) {
 
-                            parmString = "(" + ExpressionCompiler.getCastString(parms[i])
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "(" + ExpressionCompiler.getCastString(parms[i])
                                     + ")ognl.OgnlOps.toArray(" + parmString + ", " + parms[i].getComponentType().getName()
-                                    + ".class, true)";
-
+                                    + ".class, true)",
+                                    parms[i]
+                            );
+                            
                         } else  if (parms[i].isPrimitive()) {
 
                             Class wrapClass = OgnlRuntime.getPrimitiveWrapperClass(parms[i]);
+                            
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "((" + wrapClass.getName()
+                                    + ")ognl.OgnlOps.convertValue(" + parmString + ","
+                                    + wrapClass.getName() + ".class, true))."
+                                    + OgnlRuntime.getNumericValueGetter(wrapClass),
+                                    parms[i]
+                            );
 
-                            parmString = "((" + wrapClass.getName()
-                            + ")ognl.OgnlOps.convertValue(" + parmString + ","
-                            + wrapClass.getName() + ".class, true))."
-                            + OgnlRuntime.getNumericValueGetter(wrapClass);
                         } else if (parms[i] != Object.class) {
 
-                            parmString = "(" + parms[i].getName() + ")ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)";
+                            parmString = OgnlRuntime.getCompiler().createLocalReference(context,
+                                    "(" + parms[i].getName() + ")ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)",
+                                    parms[i]
+                            );
                         } else if ((NodeType.class.isInstance(_children[i])
                                 && ((NodeType)_children[i]).getGetterClass() != null
                                 && Number.class.isAssignableFrom(((NodeType)_children[i]).getGetterClass()))
                 _getterClass = m.getReturnType();
 
                 context.setCurrentType(m.getReturnType());
-                context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+                context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
             }
 
         } catch (Throwable t) {

File src/java/ognl/ASTTest.java

                     String value = OgnlRuntime.getChildSource(context, target, _children[i]);
 
                     if (i == 0) {
-                        
-                        value = "ognl.OgnlOps.booleanValue(" + value + ")";
+
+                        if (!OgnlRuntime.isBoolean(value))
+                            value = "ognl.OgnlOps.booleanValue(" + value + ")";
                     }
 
                     result += value;

File src/java/ognl/ASTVarRef.java

 // --------------------------------------------------------------------------
 package ognl;
 
+import ognl.enhance.OrderedReturn;
 import ognl.enhance.UnsupportedCompilationException;
 
 
  * @author Luke Blanshard (blanshlu@netscape.net)
  * @author Drew Davidson (drew@ognl.org)
  */
-public class ASTVarRef extends SimpleNode implements NodeType
-{
+public class ASTVarRef extends SimpleNode implements NodeType, OrderedReturn {
+    
     private String _name;
     
     protected Class _getterClass;
-    
+
+    protected String _core;
+    protected String _last;
+
     public ASTVarRef(int id)
     {
         super(id);
     {
         return null;
     }
-    
+
+    public String getCoreExpression()
+    {
+        return _core;
+    }
+
+    public String getLastExpression()
+    {
+        return _last;
+    }
+
     public String toString()
     {
         return "#" + _name;
     
     public String toGetSourceString(OgnlContext context, Object target)
     {
-        if (context.get(_name) != null) {
+        Object value = context.get(_name);
+
+        if (value != null) {
             
-            _getterClass = context.get(_name).getClass();
+            _getterClass = value.getClass();
         }
+
+        context.setCurrentType(_getterClass);
+        context.setCurrentAccessor(context.getClass());
         
-        if (_getterClass != null) {
-            
-            context.setCurrentType(_getterClass);
-            context.setCurrentAccessor(OgnlContext.class);
-        }
-        
-        if (_parent != null && ASTAssign.class.isInstance(_parent)) {
-            return "$1.put(\"" + _name + "\",";
-        }
-        
-        context.setCurrentObject(context.get(_name));
+        context.setCurrentObject(value);
         context.setRoot(context.get(_name));
         
         if (context.getCurrentObject() == null)
             throw new UnsupportedCompilationException("Current context object is null, can't compile var reference.");
 
-        return "((" + OgnlRuntime.getCompiler().getClassName(context.getCurrentObject().getClass()) + ")$1.get(\"" + _name + "\"))";
+        String pre = "";
+        String post = "";
+        if (context.getCurrentType() != null) {
+            pre = "((" + OgnlRuntime.getCompiler().getInterfaceClass(context.getCurrentType()).getName() + ")";
+            post = ")";
+        }
+        
+        if (_parent != null && ASTAssign.class.isInstance(_parent)) {
+            _core = "$1.put(\"" + _name + "\",";
+            _last = pre + "$1.get(\"" + _name + "\")" + post;
+            
+            return _core;
+        }
+
+        return pre + "$1.get(\"" + _name + "\")" + post;
     }
     
     public String toSetSourceString(OgnlContext context, Object target)

File src/java/ognl/BooleanExpression.java

                 _getterClass = value.getClass();
             else
                 _getterClass = Boolean.TYPE;
+
+            String ret = super.toGetSourceString(context, target);
+
+            if ("(false)".equals(ret))
+                return "false";
+            else if ("(true)".equals(ret))
+                return "true";
             
-            return super.toGetSourceString(context, target);
+            return ret;
             
         } catch (NullPointerException e) {
             

File src/java/ognl/ComparisonExpression.java

             
             boolean conversion = OgnlRuntime.shouldConvertNumericTypes(context);
             
-            String result = conversion ? getComparisonFunction() + "( ($w) " : "";
+            String result = conversion ? "(" + getComparisonFunction() + "( ($w) " : "(";
             
             result += OgnlRuntime.getChildSource(context, target, _children[0], conversion)
             + " " 
             + OgnlRuntime.getChildSource(context, target, _children[1], conversion);
             
             result += conversion ? ")" : "";
-            
+
+            context.setCurrentType(Boolean.TYPE);
+
+            result += ")";
+
             return result;
         } catch (NullPointerException e) {
             

File src/java/ognl/ExpressionNode.java

     public String toGetSourceString(OgnlContext context, Object target)
     {
         String result = (_parent == null || NumericExpression.class.isAssignableFrom(_parent.getClass())) ? "" : "(";
-        
+
         if ((_children != null) && (_children.length > 0)) {
             for ( int i = 0; i < _children.length; ++i ) {
                 if (i > 0) {
                 result += value;
             }
         }
-        
+
         if (_parent != null && !NumericExpression.class.isAssignableFrom(_parent.getClass())) {
             result = result + ")";
         }

File src/java/ognl/ObjectPropertyAccessor.java

                     return "";
                 }
 
-
                 return "";
             }
 
             context.setCurrentType(m.getReturnType());
-            context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+            context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
 
             return "." + m.getName() + "()";
 
 
             Class parm = m.getParameterTypes()[0];
             String conversion = null;
-
+            
             if (m.getParameterTypes().length > 1)
                 throw new UnsupportedCompilationException("Object property accessors can only support single parameter setters.");
 
+
+
             if (parm.isPrimitive()) {
-
+                
                 Class wrapClass = OgnlRuntime.getPrimitiveWrapperClass(parm);
 
-                conversion = "((" + wrapClass.getName() + ")ognl.OgnlOps.convertValue($3," + wrapClass.getName()
-                             + ".class, true))." + OgnlRuntime.getNumericValueGetter(wrapClass);
+                conversion = OgnlRuntime.getCompiler().createLocalReference(context,
+                        "((" + wrapClass.getName() + ")ognl.OgnlOps.convertValue($3," + wrapClass.getName()
+                        + ".class, true))." + OgnlRuntime.getNumericValueGetter(wrapClass),
+                        parm
+                );
+
             } else if (parm.isArray()) {
 
-                conversion = "((" + ExpressionCompiler.getCastString(parm) + ")ognl.OgnlOps.convertValue($3,"
-                             + ExpressionCompiler.getCastString(parm) + ".class))";
+                conversion = OgnlRuntime.getCompiler().createLocalReference(context,
+                         "(" + ExpressionCompiler.getCastString(parm) + ")ognl.OgnlOps.convertValue($3,"
+                        + ExpressionCompiler.getCastString(parm) + ".class)",
+                        parm);
+                
             } else {
 
-                conversion = "((" + parm.getName() + ")ognl.OgnlOps.convertValue($3,"
-                             + parm.getName()
-                             + ".class))";
+                conversion = OgnlRuntime.getCompiler().createLocalReference(context,
+                         "(" + parm.getName()+ ")ognl.OgnlOps.convertValue($3,"
+                        + parm.getName()
+                        + ".class)",
+                        parm);
             }
 
             context.setCurrentType(m.getReturnType());
-            context.setCurrentAccessor(OgnlRuntime.getSuperOrInterfaceClass(m, m.getDeclaringClass()));
+            context.setCurrentAccessor(OgnlRuntime.getCompiler().getSuperOrInterfaceClass(m, m.getDeclaringClass()));
 
             return "." + m.getName() + "(" + conversion + ")";
 

File src/java/ognl/OgnlOps.java

      */
     public static boolean booleanValue(Object value)
     {
-        if (value == null) return false;
+        if (value == null)
+            return false;
         Class c = value.getClass();
-        if (c == Boolean.class) return ((Boolean) value).booleanValue();
+
+        if (c == Boolean.class)
+            return ((Boolean) value).booleanValue();
+
         // if ( c == String.class )
         // return ((String)value).length() > 0;
-        if (c == Character.class) return ((Character) value).charValue() != 0;
-        if (value instanceof Number) return ((Number) value).doubleValue() != 0;
+
+        if (c == Character.class)
+            return ((Character) value).charValue() != 0;
+        if (value instanceof Number)
+            return ((Number) value).doubleValue() != 0;
+        
         return true; // non-null
     }
 
         }
         return result;
     }
+
+    public static Object returnValue(Object ignore, Object returnValue)
+    {
+        return returnValue;
+    }
 }

File src/java/ognl/OgnlRuntime.java

 
         return null;
     }
-    
-    public static Class getSuperOrInterfaceClass(Method m, Class clazz)
+
+    public static boolean isBoolean(String expression)
     {
-        if (clazz.getSuperclass() != null) {
-            Class superClass = getSuperOrInterfaceClass(m, clazz.getSuperclass());
-            
-            if (superClass != null)
-                return superClass;
-        }
-
-        boolean clazzHasMethod = containsMethod(m, clazz);
-
-        if (clazz.getInterfaces() != null && clazz.getInterfaces().length > 0) {
-
-            Class[] intfs = clazz.getInterfaces();
-            Class intClass = null;
-            for (int i = 0; i < intfs.length; i++) {
-                intClass = getSuperOrInterfaceClass(m, intfs[i]);
-
-                if (intClass != null && !clazzHasMethod)
-                    return intClass;
-            }
-        }
-
-        if (clazzHasMethod)
-            return clazz;
-
-        return null;
-    }
-
-    public static boolean containsMethod(Method m, Class clazz)
-    {
-        Method[] methods = clazz.getMethods();
-
-        if (methods == null)
+        if (expression == null)
             return false;
 
-        for (int i = 0; i < methods.length; i++) {
-            if (methods[i].getName().equals(m.getName())
-                    && methods[i].getReturnType() == m.getReturnType()) {
-
-                Class[] parms = m.getParameterTypes();
-                if (parms == null)
-                    continue;
-
-                Class[] mparms = methods[i].getParameterTypes();
-                if (mparms == null || mparms.length != parms.length)
-                    continue;
-
-                boolean parmsMatch = true;
-                for (int p = 0; p < parms.length; p++) {
-                    if (parms[p] != mparms[p]) {
-                        parmsMatch = false;
-                        break;
-                    }
-                }
-
-                if (!parmsMatch)
-                    continue;
-
-                Class[] exceptions = m.getExceptionTypes();
-                if (exceptions == null)
-                    continue;
-
-                Class[] mexceptions = methods[i].getExceptionTypes();
-                if (mexceptions == null || mexceptions.length != exceptions.length)
-                    continue;
-
-                boolean exceptionsMatch = true;
-                for (int e = 0; e < exceptions.length; e++) {
-                    if (exceptions[e] != mexceptions[e]) {
-                        exceptionsMatch = false;
-                        break;
-                    }
-                }
-
-                if (!exceptionsMatch)
-                    continue;
-
-                return true;
-            }
-        }
+        if ("true".equals(expression) || "false".equals(expression)
+                    || "!true".equals(expression) || "!false".equals(expression)
+                || "(true)".equals(expression)
+                || "!(true)".equals(expression)
+                || "(false)".equals(expression)
+                || "!(false)".equals(expression)
+                || expression.startsWith("ognl.OgnlOps"))
+            return true;
 
         return false;
     }

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

 import javassist.*;
 import ognl.*;
 
+import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.*;
 
 
 /**
  * Responsible for managing/providing functionality related to compiling generated java source
- * expressions via bytecode enhancements for a given ognl expression. 
- * 
+ * expressions via bytecode enhancements for a given ognl expression.
+ *
  * @author jkuhnert
  */
-public class ExpressionCompiler implements OgnlExpressionCompiler
-{   
+public class ExpressionCompiler implements OgnlExpressionCompiler {
     public static final String PRE_CAST = "_preCast";
-    
+
     protected Map _loaders = new HashMap();
     protected Map _classPools = new HashMap();
-    
+
     protected ClassPool _pool;
-    
+
     public ExpressionCompiler()
     {
     }
-    
+
     public static void addCastString(OgnlContext context, String cast)
     {
-        String value = (String)context.get(PRE_CAST);
-        
+        String value = (String) context.get(PRE_CAST);
+
         if (value != null)
             value = cast + value;
         else
             value = cast;
-        
+
         context.put(PRE_CAST, value);
     }
-    
+
     public String castExpression(OgnlContext context, Node expression, String body)
     {
-        
+
         if (context.getCurrentAccessor() == null
-                || context.getPreviousType() == null
-                || context.getCurrentAccessor().isAssignableFrom(context.getPreviousType())
-                || (context.getCurrentType() != null
-                    && context.getCurrentObject() != null
-                    && context.getCurrentType().isAssignableFrom(context.getCurrentObject().getClass())
-                    && context.getCurrentAccessor().isAssignableFrom(context.getPreviousType()))
-                || body == null || body.trim().length() < 1
-                || (context.getCurrentType() != null && context.getCurrentType().isArray())
-                || ASTOr.class.isInstance(expression)
-                || ASTAnd.class.isInstance(expression)
-                || ASTRootVarRef.class.isInstance(expression)
-                || context.getCurrentAccessor() == Class.class
-                || Number.class.isAssignableFrom(context.getCurrentAccessor())
-                || (context.get(ExpressionCompiler.PRE_CAST) != null && ((String)context.get(ExpressionCompiler.PRE_CAST)).startsWith("new"))
-                || ASTStaticField.class.isInstance(expression)
-                || (OrderedReturn.class.isInstance(expression) && ((OrderedReturn)expression).getLastExpression() != null))
+            || context.getPreviousType() == null
+            || context.getCurrentAccessor().isAssignableFrom(context.getPreviousType())
+            || (context.getCurrentType() != null
+                && context.getCurrentObject() != null
+                && context.getCurrentType().isAssignableFrom(context.getCurrentObject().getClass())
+                && context.getCurrentAccessor().isAssignableFrom(context.getPreviousType()))
+            || body == null || body.trim().length() < 1
+            || (context.getCurrentType() != null && context.getCurrentType().isArray())
+            || ASTOr.class.isInstance(expression)
+            || ASTAnd.class.isInstance(expression)
+            || ASTRootVarRef.class.isInstance(expression)
+            || context.getCurrentAccessor() == Class.class
+            || Number.class.isAssignableFrom(context.getCurrentAccessor())
+            || (context.get(ExpressionCompiler.PRE_CAST) != null && ((String) context.get(ExpressionCompiler.PRE_CAST)).startsWith("new"))
+            || ASTStaticField.class.isInstance(expression)
+            || (OrderedReturn.class.isInstance(expression) && ((OrderedReturn) expression).getLastExpression() != null))
             return body;
 
 /*
                 + "\n current Accessor: " + context.getCurrentAccessor()
                 + " previous Accessor: " + context.getPreviousAccessor()
                 + " current object " + context.getCurrentObject());
-  */      
-        
-        String castClass = null;
-        if (context.getCurrentType() != null && context.getCurrentType().isArray()) {
-            
-            castClass = ExpressionCompiler.getCastString(context.getCurrentType());
-        } else if (context.getCurrentAccessor().isArray()) {
-            
-            castClass = ExpressionCompiler.getCastString(context.getCurrentAccessor());
-        } else {
-            castClass = (context.getCurrentAccessor().getName().indexOf("$") > -1) 
-            ? OgnlRuntime.getCompiler().getInterfaceClass(context.getCurrentAccessor()).getName()
-                : context.getCurrentAccessor().getName();
-        }
+  */
 
-        ExpressionCompiler.addCastString(context, "((" + castClass + ")");
-        
+        ExpressionCompiler.addCastString(context, "((" + ExpressionCompiler.getCastString(context.getCurrentAccessor()) + ")");
+
         return ")" + body;
     }
-    
+
     public String getClassName(Class clazz)
     {
         if (clazz.getName().equals("java.util.AbstractList$Itr"))
             return Iterator.class.getName();
-        
+
         if (Modifier.isPublic(clazz.getModifiers()) && clazz.isInterface())
             return clazz.getName();
-        
+
         Class[] intf = clazz.getInterfaces();
-        
-        for (int i=0; i < intf.length; i++) {
+
+        for (int i = 0; i < intf.length; i++) {
             if (intf[i].getName().indexOf("util.List") > 0)
                 return intf[i].getName();
             else if (intf[i].getName().indexOf("Iterator") > 0)
                 return intf[i].getName();
         }
-        
+
         if (clazz.getSuperclass() != null && clazz.getSuperclass().getInterfaces().length > 0)
             return getClassName(clazz.getSuperclass());
-        
+
         return clazz.getName();
     }
-    
+
+    public Class getSuperOrInterfaceClass(Method m, Class clazz)
+    {
+        if (clazz.getInterfaces() != null && clazz.getInterfaces().length > 0) {
+
+            Class[] intfs = clazz.getInterfaces();
+            Class intClass = null;
+            for (int i = 0; i < intfs.length; i++) {
+                intClass = getSuperOrInterfaceClass(m, intfs[i]);
+
+                if (intClass != null)
+                    return intClass;
+
+                if (Modifier.isPublic(intfs[i].getModifiers()) && containsMethod(m, intfs[i]))
+                    return intfs[i];
+            }
+        }
+
+        if (clazz.getSuperclass() != null) {
+            Class superClass = getSuperOrInterfaceClass(m, clazz.getSuperclass());
+
+            if (superClass != null)
+                return superClass;
+        }
+
+        if (Modifier.isPublic(clazz.getModifiers()) && containsMethod(m, clazz))
+            return clazz;
+
+        return null;
+    }
+
+    public boolean containsMethod(Method m, Class clazz)
+    {
+        Method[] methods = clazz.getMethods();
+
+        if (methods == null)
+            return false;
+
+        for (int i = 0; i < methods.length; i++) {
+            if (methods[i].getName().equals(m.getName())
+                && methods[i].getReturnType() == m.getReturnType()) {
+
+                Class[] parms = m.getParameterTypes();