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

JFR: Missing message with Objects.requireNonNull

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • hotspot
    • None
    • jfr
    • b13

      The APIs in jdk.jfr and jdk.management.jfr modules uses Objects.requireNonNull to help users understand an incorrect parameter was passed to a method (and not a potential bug in the JFR implementation). The guard also prevents obscure bugs later because null was incorrectly used (fail fast).

      Most of these places use Objects.requireNonNull(parameter, "parameter"), so users know which parameter was wrong, not just the method. Still, there are few places where this is not the case, for example EventStream::onEvent(...).

      This should be fixed

            egahlin Erik Gahlin
            egahlin Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: