Commits

Anonymous committed 7bae28f

removing some "__link" black magic, the last class and property accessed are already in the context

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@2076e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (3)

core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java

     }
 
     private Object[] getClassProperty(Map<String, Object> context) {
-        return (Object[]) context.get("__link");
+        Object lastClass = context.get(LAST_BEAN_CLASS_ACCESSED);
+        Object lastProperty = context.get(LAST_BEAN_PROPERTY_ACCESSED);
+        return (lastClass != null && lastProperty != null) ? new Object[] {lastClass, lastProperty} : null;
     }
 
     /**

core/src/main/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java

     private boolean logMissingProperties;
     public static final String THROW_EXCEPTION_ON_FAILURE = OgnlValueStack.class.getName() + ".throwExceptionOnFailure";
 
-    public static void link(Map<String, Object> context, Class clazz, String name) {
-        context.put("__link", new Object[]{clazz, name});
-    }
-
-
     CompoundRoot root;
     transient Map<String, Object> context;
     Class defaultType;

core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectAccessor.java

     @Override
     public Object getProperty(Map map, Object o, Object o1) throws OgnlException {
         Object obj = super.getProperty(map, o, o1);
-        OgnlValueStack.link(map, o.getClass(), (String) o1);
 
         map.put(XWorkConverter.LAST_BEAN_CLASS_ACCESSED, o.getClass());
         map.put(XWorkConverter.LAST_BEAN_PROPERTY_ACCESSED, o1.toString());