From e091eb41f3da740a016bef74f65c3ed836e6b1ee Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Tue, 19 Mar 2013 21:58:55 +0000 Subject: [PATCH] WW-3406 Solves NPE problem git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1458537 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/struts2/jsf/StrutsNavigationHandler.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java b/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java index 1ad62a43d..b0e4f0386 100644 --- a/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java +++ b/plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java @@ -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 extends NavigationHandler { 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();