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:
James Holmes
2007-07-17 17:30:58 +00:00
parent 63dea54f95
commit f2f11ea625
3 changed files with 7 additions and 1 deletions
@@ -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>