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

Use Optional.isEmpty instead of !Optional.isPresent in java.base

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 20
    • None
    • core-libs
    • b10

      Optional.isEmpty() was introduced to avoid negation in long option chains.
      Let's apply this new handy method to JDK code.

          [JDK-8291954] Use Optional.isEmpty instead of !Optional.isPresent in java.base

          Dukebot added a comment -
          Changeset: ae520537
          Author: Andrey Turbanov <aturbanov@openjdk.org>
          Date: 2022-08-06 09:53:35 +0000
          URL: https://git.openjdk.org/jdk/commit/ae52053757ca50c4b56989c9b0c6890e504e4088

          Dukebot added a comment - Changeset: ae520537 Author: Andrey Turbanov < aturbanov@openjdk.org > Date: 2022-08-06 09:53:35 +0000 URL: https://git.openjdk.org/jdk/commit/ae52053757ca50c4b56989c9b0c6890e504e4088

          Robo Duke added a comment -
          A pull request was submitted for review.
          URL: https://git.openjdk.org/jdk/pull/9697
          Date: 2022-08-01 06:51:44 +0000

          Robo Duke added a comment - A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9697 Date: 2022-08-01 06:51:44 +0000

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

              Created:
              Updated:
              Resolved: