You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/01/15 09:14:03 UTC

[1/2] git commit: WW-4244 Uses ObjectFactory to instantiate action in config-browser

Updated Branches:
  refs/heads/master f62ea507f -> b1d3401c3


WW-4244 Uses ObjectFactory to instantiate action in config-browser


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/750d6800
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/750d6800
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/750d6800

Branch: refs/heads/master
Commit: 750d68009cfebd50bbfd4cf32f9ba7a29143262a
Parents: f62ea50
Author: Lukasz Lenart <lu...@apache.org>
Authored: Wed Jan 15 09:12:23 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Wed Jan 15 09:12:23 2014 +0100

----------------------------------------------------------------------
 .../org/apache/struts2/config_browser/ShowConfigAction.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/750d6800/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
----------------------------------------------------------------------
diff --git a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
index 1b3b932..faecb86 100644
--- a/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
+++ b/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowConfigAction.java
@@ -1,4 +1,5 @@
 /*
+ * $Id: ShowConfigAction.java 1536698 2013-10-29 13:00:58Z lukaszlenart $
  * $Id$
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -106,8 +107,8 @@ public class ShowConfigAction extends ActionNamesAction {
         config = configHelper.getActionConfig(namespace, actionName);
         actionNames = new TreeSet<String>(configHelper.getActionNames(namespace));
         try {
-            Class clazz = objectFactory.getClassInstance(getConfig().getClassName());
-            properties = reflectionProvider.getPropertyDescriptors(clazz.newInstance());
+            Object action = objectFactory.buildAction(actionName, namespace, config, null);
+            properties = reflectionProvider.getPropertyDescriptors(action);
         } catch (Exception e) {
             LOG.error("Unable to get properties for action " + actionName, e);
             addActionError("Unable to retrieve action properties: " + e.toString());


[2/2] git commit: WW-4282 Adds WARN level when DTD cannot be resolved locally

Posted by lu...@apache.org.
WW-4282 Adds WARN level when DTD cannot be resolved locally


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/b1d3401c
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/b1d3401c
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/b1d3401c

Branch: refs/heads/master
Commit: b1d3401c32dba235fda2624124da6b304911017d
Parents: 750d680
Author: Lukasz Lenart <lu...@apache.org>
Authored: Wed Jan 15 09:13:39 2014 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Wed Jan 15 09:13:39 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/com/opensymphony/xwork2/util/DomHelper.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/b1d3401c/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java b/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
index 15a88d8..71ecc82 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
@@ -346,8 +346,10 @@ public class DomHelper {
         @Override
         public InputSource resolveEntity(String publicId, String systemId) {
             if (dtdMappings != null && dtdMappings.containsKey(publicId)) {
-                String val = dtdMappings.get(publicId).toString();
-                return new InputSource(ClassLoaderUtil.getResourceAsStream(val, DomHelper.class));
+                String dtdFile = dtdMappings.get(publicId);
+                return new InputSource(ClassLoaderUtil.getResourceAsStream(dtdFile, DomHelper.class));
+            } else if (LOG.isWarnEnabled()) {
+                LOG.warn("Local DTD is missing for publicID: #0 - defined mappings: #1", publicId, dtdMappings);
             }
             return null;
         }