1. opensymphony
  2. webwork

Commits

plightbo  committed 7badf6d

fixes weird ognl itrospection issue

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@378573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 07f5fa1
  • Branches master

Comments (0)

Files changed (1)

File src/config-browser/com/opensymphony/webwork/config_browser/ShowConfigAction.java

View file
 package com.opensymphony.webwork.config_browser;
 
-import java.beans.PropertyDescriptor;
-import java.util.Set;
-import java.util.TreeSet;
-
+import com.opensymphony.xwork.config.entities.ActionConfig;
+import ognl.OgnlRuntime;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import com.opensymphony.xwork.config.entities.ActionConfig;
-import ognl.OgnlRuntime;
+import java.beans.PropertyDescriptor;
+import java.util.Set;
+import java.util.TreeSet;
 
 /**
  * ShowConfigAction
- * 
+ *
  * @author Jason Carreira Created Aug 11, 2003 9:42:12 PM
  */
 public class ShowConfigAction extends ActionNamesAction {
+    private static final PropertyDescriptor[] PDSAT = new PropertyDescriptor[0];
+
     private String namespace;
     private String actionName;
     private ActionConfig config;
         return properties;
     }
 
-
     public String execute() throws Exception {
         super.execute();
         config = ConfigurationHelper.getActionConfig(namespace, actionName);
         actionNames =
                 new TreeSet(ConfigurationHelper.getActionNames(namespace));
         try {
-            properties =
-                    OgnlRuntime.getPropertyDescriptorsArray(getConfig().getClazz());
+            java.util.Collection pds = OgnlRuntime.getPropertyDescriptors(getConfig().getClazz()).values();
+            properties = (PropertyDescriptor[]) pds.toArray(PDSAT);
         } catch (Exception e) {
             log.error("Unable to get properties for action " + actionName, e);
-            addActionError(
-                    "Unable to retrieve action properties: " + e.toString());
+            addActionError("Unable to retrieve action properties: " + e.toString());
         }
 
         if (hasErrors()) //super might have set some :)
             return SUCCESS;
     }
 }
+