mirror of
https://github.com/apache/struts.git
synced 2026-08-07 23:57:03 +00:00
WW-1703 NullPointer in SiteGraph
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@556983 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+5
-1
@@ -125,7 +125,11 @@ public class DOTRenderer {
|
||||
|
||||
} else if (resultClassName.indexOf("Redirect") != -1) {
|
||||
// check if the redirect is to an action -- if so, link it
|
||||
String location = getViewLocation((String) resultConfig.getParams().get("location"), namespace);
|
||||
String locationConfig = (String) resultConfig.getParams().get("location");
|
||||
if (locationConfig == null) {
|
||||
locationConfig = (String) resultConfig.getParams().get("actionName");
|
||||
}
|
||||
String location = getViewLocation(locationConfig, namespace);
|
||||
// FIXME: work with new configuration style
|
||||
if (location.endsWith("action")) {
|
||||
addTempLink(action, location, Link.TYPE_REDIRECT, resultConfig.getName());
|
||||
|
||||
@@ -28,5 +28,6 @@ digraph mygraph {
|
||||
tutorial_sitegraph_guess_success_jsp -> tutorial_sitegraph_guess [label="href\n(!default)"];
|
||||
hello -> hello_jsp [label="success",color="darkseagreen2"];
|
||||
hello -> tutorial_test [label="redirect: tutorial"];
|
||||
hello -> tutorial_test [label="redirect: tutorial2"];
|
||||
tutorial_test -> tutorial_sitegraph_guess_input_ftl [label="input",color="darkseagreen2"];
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<action name="hello" class="com.opensymphony.xwork2.ActionSupport">
|
||||
<result name="success">hello.jsp</result>
|
||||
<result name="tutorial" type="redirect">/tutorial/test.action</result>
|
||||
<result name="tutorial2" type="redirect-action">/tutorial/test.action</result>
|
||||
</action>
|
||||
</package>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user