glassfish
  1. glassfish
  2. GLASSFISH-16099

[patch] NPE in UniformLogFormatter when trying to log collections/maps with null values/keys

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1_b43
    • Fix Version/s: 3.1.1_b01
    • Component/s: logging
    • Labels:
      None

      Description

      When trying to log some message with parameters which in turn contain null values/keys the UniformLogFormatter class throws a NPE because it doesn't handle such situations:

      java.lang.NullPointerException
      at com.sun.enterprise.server.logging.UniformLogFormatter.getNameValuePairs(UniformLogFormatter.java:208)
      at com.sun.enterprise.server.logging.UniformLogFormatter.uniformLogFormat(UniformLogFormatter.java:276)
      at com.sun.enterprise.server.logging.UniformLogFormatter.format(UniformLogFormatter.java:161)
      at java.util.logging.StreamHandler.publish(StreamHandler.java:179)
      at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
      at java.util.logging.Logger.log(Logger.java:458)

      The attached patch (against SVN rev. 45202) fixes this problem.

        Activity

        Hide
        naman_mehta added a comment -

        I will verify and plan to check-in the same.

        Show
        naman_mehta added a comment - I will verify and plan to check-in the same.
        Hide
        chaoslayer added a comment -

        So, this will not make it into 3.1?

        Show
        chaoslayer added a comment - So, this will not make it into 3.1?
        Hide
        naman_mehta added a comment -

        Right now 3.1 branch is closed so we can make it patch for 3.1. But it will be check-in in the 3.2 by monday.

        Show
        naman_mehta added a comment - Right now 3.1 branch is closed so we can make it patch for 3.1. But it will be check-in in the 3.2 by monday.
        Hide
        chaoslayer added a comment -

        OK, so how do we get those patches if we want to use a version build from upstream (=you)?

        Or is this then scheduled for inclusion to a patch release?

        Show
        chaoslayer added a comment - OK, so how do we get those patches if we want to use a version build from upstream (=you)? Or is this then scheduled for inclusion to a patch release?
        Hide
        naman_mehta added a comment -

        It would be added in next patch.

        Show
        naman_mehta added a comment - It would be added in next patch.
        Hide
        naman_mehta added a comment -

        Made changes required for the same. Bug is fixed now.

        Show
        naman_mehta added a comment - Made changes required for the same. Bug is fixed now.
        Hide
        ancoron added a comment -

        Which revision?

        Show
        ancoron added a comment - Which revision?
        Hide
        naman_mehta added a comment -

        Right now you can find in latest nightly build and soon it will be part of 3.1 next release.

        Show
        naman_mehta added a comment - Right now you can find in latest nightly build and soon it will be part of 3.1 next release.

          People

          • Assignee:
            naman_mehta
            Reporter:
            ancoron
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: