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

Missing null pointer checks for streams

XMLWordPrintable

    • b24
    • x86
    • other
    • Verified

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        There are couple of places where null checks are missing

        (Int/Long/Double/)Stream.close
        Int/Double/LongStream.flatmap
        Int/Double/LongStream.collect(x,y, 3rd) 3rd argument not being checked


        Also these methods does throw NPE but they consume the stream before throwing.
        I like to think of null parameter checks as side-effect free.

        Stream.forEach
        Stream.forEachOrdered
        Stream.sorted
        Stream.toArray


        REPRODUCIBILITY :
        This bug can be reproduced always.

              psandoz Paul Sandoz
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: