Commits

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

Misc tests.

  • Participants
  • Parent commits 468d368

Comments (0)

Files changed (4)

   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/ognl/TestOgnlRuntime.java" afterPath="$PROJECT_DIR$/src/test/java/ognl/TestOgnlRuntime.java" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/BaseSyntheticObject.java" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/OGNL.iws" afterPath="$PROJECT_DIR$/OGNL.iws" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java" afterPath="$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/SubclassSyntheticObject.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/IndexAccessTest.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/IndexAccessTest.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/java/ognl/ASTChain.java" afterPath="$PROJECT_DIR$/src/java/ognl/ASTChain.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" afterPath="$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java" />
     </list>
   </component>
   <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
       </UpdatedFiles>
     </UpdateInfo>
   </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.ArithmeticAndLogicalOperatorsTest">
+    <tempConfiguration default="false" name="ArithmeticAndLogicalOperatorsTest" 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" 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.ArithmeticAndLogicalOperatorsTest" />
       <option name="METHOD_NAME" value="" />
       <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" value="" />
       </method>
     </configuration>
     <list size="1">
-      <item index="0" class="java.lang.String" itemvalue="JUnit.TestExpressionCompiler" />
+      <item index="0" class="java.lang.String" itemvalue="JUnit.ArithmeticAndLogicalOperatorsTest" />
     </list>
     <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local">
       <option name="WORKING_DIRECTORY" />
     <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-136.  Added checks for volatile &amp;&amp; synthetic methods." />
+    <option name="LAST_COMMIT_MESSAGE" value="Misc tests." />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
     <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
     <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
     <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
     <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
     <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
-    <MESSAGE value="Fixes OGNL-112.  OgnlRuntime was incorrectly returning reader methods for simple property getters with parameters when non parameter methods with the same name should have been preferred in the method finding loop." />
     <MESSAGE value="Fixes OGNL-113.  ObjectPropertyAccessor wasn't handling the case where an object would return null from toString().  This is questionable but whatever.." />
     <MESSAGE value="Performance enhancements for source compilations." />
     <MESSAGE value="Updated to new snapshot version of 2.7.2." />
     <MESSAGE value="Resolves OGNL-141.  Added runtime optimization for method invocations such that knowledge of whether or not the method needs synchronized invocations because of private access (or whether or not security checks needs to be done) is cached - thus avoiding synchronized blocks altogether on methods that have been invoked at least once already." />
     <MESSAGE value="Resolves OGNL-133.  Brought back old OgnlRuntime.callMethod method and added deprecated info  for it." />
     <MESSAGE value="Fixes OGNL-136.  Added checks for volatile &amp;&amp; synthetic methods." />
+    <MESSAGE value="Misc tests." />
   </component>
   <component name="VssConfiguration">
     <option name="CLIENT_PATH" value="" />
     <option name="myLastEditedConfigurable" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/internal/ClassCacheImpl.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="23" column="5" selection-start="606" selection-end="606" vertical-scroll-proportion="0.2588332">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ObjectArrayPool.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="34" column="23" selection-start="1802" selection-end="1817" vertical-scroll-proportion="0.061626952">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/IntHashMap.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="141" column="0" selection-start="5050" selection-end="5050" vertical-scroll-proportion="0.45603943">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/Performance.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="140" column="13" selection-start="5286" selection-end="5286" vertical-scroll-proportion="0.17255546">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="jar:///usr/local/jdk1.5.0_12/src.zip!/java/lang/SecurityManager.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="530" column="16" selection-start="21132" selection-end="21132" vertical-scroll-proportion="0.33278555">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/ognl/InExpressionTest.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="20" column="0" selection-start="528" selection-end="528" vertical-scroll-proportion="0.24650781">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pom.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="140" column="28" selection-start="4957" selection-end="4957" vertical-scroll-proportion="0.8372287">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTMethod.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="88" column="12" selection-start="3029" selection-end="3029" vertical-scroll-proportion="0.20788825">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/ListSource.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="13" column="0" selection-start="176" selection-end="176" vertical-scroll-proportion="0.16023007">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTCtor.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="248" column="40" selection-start="9218" selection-end="9218" vertical-scroll-proportion="0.6116625">
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlOps.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="1039" column="34" selection-start="36570" selection-end="36570" vertical-scroll-proportion="0.6254682">
-          <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="162" column="32" selection-start="4600" selection-end="4600" vertical-scroll-proportion="0.5439606">
-          <folding />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/test/java/ognl/TestOgnlRuntime.java">
       <provider selected="true" editor-type-id="text-editor">
         <state line="224" column="0" selection-start="6727" selection-end="6727" vertical-scroll-proportion="0.3467543">
         </state>
       </provider>
     </entry>
+    <entry file="jar:///usr/local/jdk1.5.0_12/src.zip!/java/lang/Character.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="101" column="6" selection-start="4503" selection-end="4503" vertical-scroll-proportion="0.33278555">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ListPropertyAccessor.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="203" column="0" selection-start="7754" selection-end="7754" vertical-scroll-proportion="0.3138958">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/SearchTab.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="9" column="13" selection-start="152" selection-end="152" vertical-scroll-proportion="-0.029962547">
+          <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="61" column="6" selection-start="3497" selection-end="3497" vertical-scroll-proportion="0.24404272">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/IndexedPropertyTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="59" column="83" selection-start="3366" selection-end="3366" vertical-scroll-proportion="0.34511092">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTAdd.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="244" column="0" selection-start="10463" selection-end="10463" vertical-scroll-proportion="0.27280197">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Bean3.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="53" column="0" selection-start="2133" selection-end="2133" vertical-scroll-proportion="0.28348398">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/objects/Root.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="103" column="36" selection-start="4725" selection-end="4725" vertical-scroll-proportion="0.32210353">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTIn.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="78" column="12" selection-start="2969" selection-end="2969" vertical-scroll-proportion="0.917603">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTNotIn.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="38" column="6" selection-start="1921" selection-end="1921" vertical-scroll-proportion="0.06367041">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/ognl/ASTChain.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="83" column="12" selection-start="2816" selection-end="2816" vertical-scroll-proportion="0.17255546">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/ognl/test/ArithmeticAndLogicalOperatorsTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="116" column="40" selection-start="5024" selection-end="5024" vertical-scroll-proportion="0.23418242">
+          <folding />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/java/ognl/OgnlRuntime.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="2457" column="0" selection-start="90952" selection-end="90952" vertical-scroll-proportion="0.5439606">
+        <state line="343" column="35" selection-start="14720" selection-end="14720" vertical-scroll-proportion="0.112571895">
           <folding>
             <element signature="imports" expanded="true" />
           </folding>

File src/java/ognl/ASTChain.java

         Object result = source;
 
         for(int i = 0, ilast = _children.length - 1; i <= ilast; ++i) {
+            
             boolean handled = false;
 
             if (i < ilast) {

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

             {ROOT, "tab.searchCriteria[index1].displayName", "Woodland creatures"},
             {ROOT, "tab.searchCriteriaSelections[index1][index2]", Boolean.TRUE},
             {ROOT, "tab.searchCriteriaSelections[index1][index2]", Boolean.TRUE, Boolean.FALSE, Boolean.FALSE},
+            {ROOT, "map['bar'].value", 100, 50, 50}
     };
 
     /*

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

         map.put( DynamicSubscript.first, new Integer(99) );
         map.put( "baz", array);
         map.put("value", new Bean2());
+        map.put("bar", new Bean3());
         map.put(new Long(82), "StringStuff=someValue");
 
         IFormComponent comp = new FormComponentImpl();