bugfix/issue-3619-kotlin-coroutine-null-value into 4.14.x
Issue #3619:
Only convert new NullValue() when target is kotlinx.coroutines.flow.Flow in DataIntroductionAdvice::interceptCompletionStage to resolve issue with returning non-null string of NullValue[]
I'm uncertain if this is a naive fix for this scenario, but it does seem a simple way to resolve the problem in the reproducer example in https://github.com/micronaut-projects/micronaut-data/issues/3619 .
It's the only other place that NullValue is used anywhere and it aligns to the check for Flow performed in io.micronaut.data.runtime.intercept.async.AbstractAsyncInterceptor, so I think it would do the trick and preserve the behavior that prompted introducing NullValue in the first place.
I'm happy to adjust the commit on any feedback and add unit tests for the change, however, I am uncertain of where to place any unit tests for this adjustment.
Let me know, thanks!
Pls target 5.x