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

Use Optional.empty() instead of ofNullable(null) in HttpResponse.BodySubscribers.discarding

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 18
    • None
    • core-libs
    • b19

      Usage of Optional.ofNullable is unnecessary when value is known. If it's null value Optional.empty() should be preferred, as it doesn't perform redundant null check.

            aturbanov Andrey Turbanov
            aturbanov Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: