You are viewing a plain text version of this content. The canonical link for it is here.
Posted to portalapps-dev@portals.apache.org by wo...@apache.org on 2014/11/01 17:16:54 UTC
svn commit: r1635985 -
/portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/WebContentPortlet.java
Author: woonsan
Date: Sat Nov 1 16:16:53 2014
New Revision: 1635985
URL: http://svn.apache.org/r1635985
Log:
avoid NPE when rewriter argument is null (see j2-admin's org.apache.jetspeed.portlets.sso.SSOWebContentPortlet passing null when not expecting any result during pre-authentication request call).
Modified:
portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/WebContentPortlet.java
Modified: portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/WebContentPortlet.java
URL: http://svn.apache.org/viewvc/portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/WebContentPortlet.java?rev=1635985&r1=1635984&r2=1635985&view=diff
==============================================================================
--- portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/WebContentPortlet.java (original)
+++ portals/applications/webcontent/trunk/portlets/src/main/java/org/apache/portals/applications/webcontent2/portlet/WebContentPortlet.java Sat Nov 1 16:16:53 2014
@@ -446,6 +446,12 @@ public class WebContentPortlet extends G
httpResponse = httpClient.execute(httpRequest, httpClientContext);
}
+ // TO AVOID NPE when rewriter argument is null (see org.apache.jetspeed.portlets.sso.SSOWebContentPortlet passing null)
+ if (rewriter == null)
+ {
+ return null;
+ }
+
// ...reset base URL with fully resolved path (e.g. if a directory, path will end with a /, which it may not have in the call to this method)
rewriter.setBaseUrl( rewriter.getBaseRelativeUrl( httpRequest.getURI().getPath() )) ;