amaembo / streamex

Enhancing Java Stream API
Apache License 2.0
2.18k stars 249 forks source link

is it safe to pass null to StreamEx.of #266

Closed centralhardware closed 1 year ago

amaembo commented 1 year ago

If you need to get an empty stream for null and a stream of one element for non-null input, use StreamEx.ofNullable.