Use j.u.Object.requireNonNull in the JDK codebase

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • tbd
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • generic
    • generic

      The java.util.Objects class added in JDK 7 includes a pair of requireNonNull methods, one which takes one argument to be checked and another which takes a message for the NPE if one is thrown.

      The JDK code would benefit from using these methods in lieu of the more verbose "if (o == null) throw new NullPointerException..."

            Assignee:
            Joe Darcy
            Reporter:
            Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: