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

Stream.findFirst unnecessarily always allocates an Op

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 10
    • Component/s: core-libs
    • Labels:

      Description

      The factory methods in java.util.stream.FindOps unnecessarily allocate an instance of FindOp. Such instances can be constant and held in static final fields (or lazily allocated with @Stable).

        Attachments

          Activity

            People

            • Assignee:
              psandoz Paul Sandoz (Inactive)
              Reporter:
              psandoz Paul Sandoz (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: