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

Enable ShowCodeDetailsInExceptionMessages by default

XMLWordPrintable

    • behavioral
    • minimal
    • Hide
      Code analyzing the message string of a NullPointerException might fail.
      But exception message strings are not specified by any standard, so it should not be programmed against it.

      In most cases this will be tests that check for a certain behaviour and compare default output files.

      The messages containing code snippets are now printed by default.
      Show
      Code analyzing the message string of a NullPointerException might fail. But exception message strings are not specified by any standard, so it should not be programmed against it. In most cases this will be tests that check for a certain behaviour and compare default output files. The messages containing code snippets are now printed by default.
    • add/remove/modify command line option
    • Implementation

      Summary

      Enable ShowCodeDetailsInExceptionMessages by default.

      Problem

      The flag ShowCodeDetailsInExceptionMessages was introduced with CSR "JDK-8227717 Give more helpful NullPointerException messages and add flag -XX:ShowCodeDetailsInExceptionMessages" and toggles the enhancement introduced by "JEP 358: Helpful NullPointerExceptions". So far the default value is 'false', so that the enhancement is off.

      The enhanced NullPointerException messages should be printed per default.

      Solution

      Set the flag to 'true'.

            goetz Goetz Lindenmaier
            goetz Goetz Lindenmaier
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: