glassfish
  1. glassfish
  2. GLASSFISH-21052

NPE occurs in AuthenticatorBase.register with log level Fine.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0, 4.1
    • Fix Version/s: 4.1_b08
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All

      Description

      This is NPE
      java.lang.NullPointerException
      at org.apache.catalina.authenticator.AuthenticatorBase.register(AuthenticatorBase.java:861)
      at org.apache.catalina.authenticator.AuthenticatorBase.logout(AuthenticatorBase.java:973)
      at com.sun.web.security.RealmAdapter.doLogout(RealmAdapter.java:503)
      at com.sun.web.security.RealmAdapter.logout(RealmAdapter.java:485)
      at org.apache.catalina.connector.Request.logout(Request.java:2262)
      at org.apache.catalina.connector.RequestFacade.logout(RequestFacade.java:1121)

      org.apache.catalina.authenticator.AuthenticatorBase#register

      protected void register(HttpRequest request, HttpResponse response,
              Principal principal, String authType,
              String username, char[] password) {
      
          if (log.isLoggable(Level.FINE)) {
              String msg = "Authenticated '" + principal.getName() + "' with type '"
                           + authType + "'";
              log.log(Level.FINE, msg);
          }
      

      principal is null. because
      org.apache.catalina.authenticator.AuthenticatorBase#logout

              // principal and authType set to null in the following
              register(request, (HttpResponse)request.getResponse(), null,
                      null, null, null);
      

        Activity

        Hide
        Shing Wai Chan added a comment -

        Sending src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java
        Transmitting file data .
        Committed revision 63267.

        Show
        Shing Wai Chan added a comment - Sending src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java Transmitting file data . Committed revision 63267.

          People

          • Assignee:
            Shing Wai Chan
            Reporter:
            nkobayashi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: