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

CountTest causes lambda Ser/Derialization tests to fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      Description

      The recently added stream test for counting is serialization hostile and results in lambda SAND test failures.

      The test can be updated to obtain the expected size using:

        long expectedCount = data.size();

      For SAND tests, the following:

              AtomicLong expectedCount = new AtomicLong();
              data.stream().forEach(e -> expectedCount.incrementAndGet());

      will result in expectedCount being 0 on deserialization.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: