Author: lukaszlenart
Date: Tue Mar 19 21:58:55 2013
New Revision: 1458537
URL: http://svn.apache.org/r1458537
Log:
WW-3406 Solves NPE problem
Modified:
struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java
Modified:
struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java?rev=1458537&r1=1458536&r2=1458537&view=diff
==============================================================================
---
struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java
(original)
+++
struts/struts2/trunk/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java
Tue Mar 19 21:58:55 2013
@@ -21,15 +21,14 @@
package org.apache.struts2.jsf;
-import java.util.Map;
-
-import javax.faces.application.NavigationHandler;
-import javax.faces.context.FacesContext;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
+import javax.faces.application.NavigationHandler;
+import javax.faces.context.FacesContext;
+import java.util.Map;
+
/**
* Overrides the JFS navigation by delegating the result to handling by the
core
* result code lookup and execution. If a result cannot be found, the previous
@@ -60,7 +59,7 @@ public class StrutsNavigationHandler ext
public void handleNavigation(FacesContext facesContext, String fromAction,
String outcome) {
ActionContext ctx = ActionContext.getContext();
if (outcome != null) {
- if (ctx == null && ctx.getActionInvocation() == null) {
+ if (ctx == null || ctx.getActionInvocation() == null) {
delegateToParentNavigation(facesContext, fromAction, outcome);
} else {
ActionConfig config =
ctx.getActionInvocation().getProxy().getConfig();