-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
Hello,
I'm dealing with this flow in java which includes the following code :
@Override
public void doSomething(SourceType source, Optional<Scope> maybeScope) {
maybeScope.ifPresentOrElse(
scope -> scope.accept(Scope.Visitor.<Void>builder()
.something(somethingScope -> {
sink1(source, somethingScope.getId());
return null;
})
.throwOnUnknown()
.build()),
() -> sink2(source));
}
This code doesn't propagate source to sink1.
I have confirmed that data flows through ifPresentOrElse, I think data is not flowing when we deal with visitors + lambdas .
Please correct me if i'm wrong