Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8216363

NullPointerException in java.util.logging.Handler#isLoggable

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      The JavaDoc of this method states that "It will return false if the {@code LogRecord} is null.", but there is no null-check. Instead in the second line of the method a call is done on the log record, resulting in NPE.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Call java.util.logging.Handler#isLoggable with null argument.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      false
      ACTUAL -
      NullPointerException

      CUSTOMER SUBMITTED WORKAROUND :
      Override the method in every handler and add a null-check

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: