FlowMonitorState.finished has unhelpful type


The other three static methods all return <U> FlowMonitorState.StreamState<U>

why should finished() be different?


FlowMonitorState is quite awkward to use in Java. For example

if (((Object)s) instanceof FlowMonitorState.Failed) {
FlowMonitorState.Failed failed = (FlowMonitorState.Failed)(Object)s;
// use failed

It’s in fact an oversight/bug. Thanks for letting us know, I created https://github.com/akka/akka/issues/24885 to track it.