Support for java.util.function.Function#196
Conversation
jglick
left a comment
There was a problem hiding this comment.
AFAICT the compiler will default to using the deprecated overload when resolving a lambda that has not been explicitly cast to the new type, which is not what we want. It would be better to pick a new method name to ensure that the new code is selected without requiring a cumbersome cast. (See jenkinsci/jenkins-test-harness#894 for an example of a similar historical mistake.)
While we are here, the choice of Function<T, Void> does not make much sense. Consumer<T> would be the more natural functional interface. That would suggest acceptAll as the new method name.
Once released, we would of course want to update https://github.com/jenkinsci/workflow-api-plugin/blob/d104412f76ae88df02ee6012b4258d4beae06f19/src/main/java/org/jenkinsci/plugins/workflow/flow/FlowExecutionList.java#L328 accordingly.
Without breaking compatibility, allow for consumers to migrate from Guava to native Java Platform functionality.
Testing done
Tested in context by adapting
FlowExecutionListinworkflow-api.Submitter checklist