Anonymous avatar Anonymous committed 7badf6d

fixes weird ognl itrospection issue

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

Comments (0)

Files changed (1)

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

 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;
     }
 }
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.