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

NullPointerException should include the name of the null symbol

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 7u51
    • hotspot
    • x86
    • os_x

      A DESCRIPTION OF THE REQUEST :
      When the VM throws a NullPointerException it unhelpfully doesn't tell you the name of the symbol that is null. This is beyond annoying, especially when lines contain a number of possible suspects because of nested method calls. Surely the VM knows the name of the symbol that is null?

      JUSTIFICATION :
      This would save countless hours of debugging time if the VM would simply display the name of the null symbol.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      When a NullPointerException is thrown, please display the name of the null symbol.
      ACTUAL -
      Currently when a NullPointerException is thrown it just says NullPointerException but doesn't indicate which symbol is null.

      CUSTOMER SUBMITTED WORKAROUND :
      Fire up a debugger and set a breakpoint at the reported line.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: