Deal with another possible other cause of NPE seen in SIDP-508
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 10 Oct 2011 19:28:18 +0000 (19:28 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 10 Oct 2011 19:28:18 +0000 (19:28 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/branches/REL_2@3077 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/main/java/edu/internet2/middleware/shibboleth/idp/authn/AuthenticationEngine.java

index 436e42b..4112224 100644 (file)
@@ -163,11 +163,13 @@ public class AuthenticationEngine extends HttpServlet {
         if (loginContext == null) {
             LOG.warn("No login context available, unable to return to profile handler");
             forwardRequest("/error.jsp", httpRequest, httpResponse);
+            return;
         }
         
         if (loginContext.getProfileHandlerURL() == null) {
             LOG.warn("Login context did not contain a profile handler path, unable to return to profile handler");
             forwardRequest("/error.jsp", httpRequest, httpResponse);
+            return;
         }
 
         String profileUrl = HttpServletHelper.getContextRelativeUrl(httpRequest, loginContext.getProfileHandlerURL())