Commits

Anonymous committed ce00645

This commit was manufactured by cvs2svn to create tag 'xwork_1-1'.

git-svn-id: http://svn.opensymphony.com/svn/xwork/tags/xwork_1-1@742e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 7759c1b
  • Tags xwork_1-1

Comments (0)

Files changed (4)

src/java/com/opensymphony/xwork/interceptor/AliasInterceptor.java

                     String name = entry.getKey().toString();
                     String alias = (String) entry.getValue();
                     Object value = stack.findValue(name);
-                    if (null == value) {
-                        // workaround
-                        Map contextParameters = (Map) stack.getContext().get("parameters");
-                        
-                        if (null != contextParameters) {
-                            value = contextParameters.get(name);
-                        }
-                    }
-                    if (null != value) {
-                        stack.setValue(alias, value);
-                    }
+                    stack.setValue(alias, value);
                 }
             } else {
                 log.debug("invalid alias expression:" + aliasesKey);

src/java/com/opensymphony/xwork/util/XWorkConverter.java

     HashSet noMapping = new HashSet();
     HashSet unknownMappings = new HashSet();
     TypeConverter defaultTypeConverter = new XWorkBasicConverter();
-    ObjectTypeDeterminer objectTypeDeterminer = ObjectTypeDeterminerFactory.getInstance();
+    ObjectTypeDeterminer keyElementDeterminer = ObjectTypeDeterminerFactory.getInstance();
 
 
     protected XWorkConverter() {
     }
 
     public ObjectTypeDeterminer getObjectTypeDeterminer() {
-        return objectTypeDeterminer;
+        return keyElementDeterminer;
     }
 
     /**
      * @param determiner
      */
-    public void setObjectTypeDeterminer(ObjectTypeDeterminer determiner) {
-        objectTypeDeterminer = determiner;
+    public void setKeyElementDeterminer(ObjectTypeDeterminer determiner) {
+        keyElementDeterminer = determiner;
     }
 
 }

src/test/com/opensymphony/xwork/util/SetPropertiesTest.java

         
         MockObjectTypeDeterminer determiner
         =new MockObjectTypeDeterminer(null,Cat.class,null,allowAdditions);
-        XWorkConverter.getInstance().setObjectTypeDeterminer(determiner);
+        XWorkConverter.getInstance().setKeyElementDeterminer(determiner);
         
         Foo foo = new Foo();
         foo.setMoreCats(new ArrayList());
         
         MockObjectTypeDeterminer determiner
         =new MockObjectTypeDeterminer(Long.class,Cat.class,null,allowAdditions);
-        XWorkConverter.getInstance().setObjectTypeDeterminer(determiner);
+        XWorkConverter.getInstance().setKeyElementDeterminer(determiner);
         
         Foo foo = new Foo();
         foo.setAnotherCatMap(new HashMap());
     }
     public void doTestAddingAndModifyingCollectionWithObjects(Collection barColl) {
 
-        XWorkConverter.getInstance().setObjectTypeDeterminer(new DefaultObjectTypeDeterminer());
+        XWorkConverter.getInstance().setKeyElementDeterminer(new DefaultObjectTypeDeterminer());
         OgnlValueStack vs = new OgnlValueStack();
         Foo foo = new Foo();
         
         
         MockObjectTypeDeterminer determiner
         =new MockObjectTypeDeterminer(Long.class,Bar.class,"id",true);
-        XWorkConverter.getInstance().setObjectTypeDeterminer(determiner);
+        XWorkConverter.getInstance().setKeyElementDeterminer(determiner);
         
         Collection barColl=new HashSet();
         
 XWorkTiger.iws
-build