Author: agilliland
Date: Wed May 23 10:56:50 2007
New Revision: 541003
URL: http://svn.apache.org/viewvc?view=rev&rev=541003
Log:
fix null pointer in ui action interceptor caused when accessing a UIAction when
not logged in.
Modified:
roller/trunk/src/org/apache/roller/ui/struts2/util/UIActionInterceptor.java
Modified:
roller/trunk/src/org/apache/roller/ui/struts2/util/UIActionInterceptor.java
URL:
http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/ui/struts2/util/UIActionInterceptor.java?view=diff&rev=541003&r1=541002&r2=541003
==============================================================================
--- roller/trunk/src/org/apache/roller/ui/struts2/util/UIActionInterceptor.java
(original)
+++ roller/trunk/src/org/apache/roller/ui/struts2/util/UIActionInterceptor.java
Wed May 23 10:56:50 2007
@@ -60,11 +60,12 @@
// extract the authenticated user and set it
RollerSession rses = RollerSession.getRollerSession(request);
- theAction.setAuthenticatedUser(rses.getAuthenticatedUser());
+ if(rses != null) {
+ theAction.setAuthenticatedUser(rses.getAuthenticatedUser());
+ }
// extract the work weblog and set it
String weblogHandle = theAction.getWeblog();
- //String weblogHandle =
request.getParameter(RequestConstants.WEBLOG);
if(!StringUtils.isEmpty(weblogHandle)) {
WebsiteData weblog = null;
try {