RFR: 8317034: Redundant type cast

Paul Sandoz psandoz at openjdk.org
Wed Sep 27 20:18:12 UTC 2023


On Wed, 27 Sep 2023 08:50:20 GMT, Mourad Abbay <duke at openjdk.org> wrote:

> Remove redundant type cast in the java.util.stream package.

src/java.base/share/classes/java/util/stream/DoublePipeline.java line 391:

> 389:         if (maxSize < 0)
> 390:             throw new IllegalArgumentException(Long.toString(maxSize));
> 391:         return SliceOps.makeDouble(this, 0, maxSize);

Suggestion:

        return SliceOps.makeDouble(this, 0L, maxSize);

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15942#discussion_r1339158996


More information about the core-libs-dev mailing list