He-Pin(kerr)

Results 914 comments of He-Pin(kerr)

@raboof @mdedetrich @pjfanning wdyt, If you think this is ok, I will work on this weekend.

https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html#mapNotNull-java.util.function.Function- That true, @raboof yes, but this is more for a Java api.

And the use case in Spring ai https://github.com/spring-projects/spring-ai/blob/main/spring-ai-client-chat/src/main/java/org/springframework/ai/chat/client/DefaultChatClient.java#L589

@mdedetrich This operator will make avoid something like `Source.map(Optional.ofNullable(...)).filter(Optional::isPresent).map(Optional::get)`

I like your idea, maybe a `collectNonNull` when it returns null, just dropped, especially with Java 21.

It's possible, the `null` will just be ignored for some operator, and trigger another `pull(in)` if the upstream is not completed and not been pulled yet. just as the `mapAsync`...

@mdedetrich This api is not making `null` passing through the stream , but filtering the `null` value out, I think it's quite useful, clear, and high performance. why should a...

Your idea is the same as the steering wheel must be round, but some cars sell well even though their steering wheels are not round, even you love Kotlin has...

```scala holder.elem match { case Success(elem) => if (elem != null) { push(out, elem) pullIfNeeded() } else { // elem is null pullIfNeeded() pushNextIfPossible() } ``` You can see, in...

And If you think this is a bad name, we can make it a Java-only api I think this name is pretty great, so does `collectNonNull`