map(x -> x)
or filter(x -> true)
,
redundant sorted
or distinct
.
Note that a mapping operation in code like streamOfIntegers.map(Integer::valueOf)
works as requireNonNull
check:
if stream contains a null
, it will throw NullPointerException
, thus it's not absolutely redundant. Uncheck the
"Report redundant boxing in Stream.map" checkbox if you don't want such cases to be reported.
This inspection only reports if the language level of the project or module is 8 or higher
New in 2017.1