Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004862 [Resin] minor random 11-20-11 23:12 11-22-11 10:43
Reporter wtao View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.22
Summary 0004862: NullPointerException in AbstractCauchoRequest.getUserPrincipal()
Description NullPointerException in AbstractCauchoRequest.getUserPrincipal()
After looking at the source code which should looks like:

  public Principal getUserPrincipal()
  {
    requestLogin();

    Principal user;
    user = (Principal) getAttribute(AbstractLogin.LOGIN_USER_NAME);

    if (user != null)
      return user;

    WebApp webApp = getWebApp();
    if (webApp == null)
      return null;

    // If the authenticator can find the user, return it.
    Login login = webApp.getLogin();

    if (login != null) {
      user = login.getUserPrincipal(this);

      if (user != null) {
        getResponse().setPrivateCache(true);
      }
      else {
        // server/123h, server/1920
        // distinguishes between setPrivateCache and setPrivateOrResinCache
        // _response.setPrivateOrResinCache(true);
      }
    }

    return user;
  }

Is it possible that the getResponse() return null and cause this?
Additional Information We got this NPE in one of our filter and none of our previous filters on stack trace have wrapped any request/response object.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
11-20-11 23:12 wtao New Issue
11-22-11 10:43 ferg Assigned To  => ferg
11-22-11 10:43 ferg Status new => closed
11-22-11 10:43 ferg Resolution open => fixed
11-22-11 10:43 ferg Fixed in Version  => 4.0.25


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker