paulk-asert commented on PR #1732:
URL: https://github.com/apache/groovy/pull/1732#issuecomment-1167957937

   > @paulk-asert I agree, it seems the extension method `Optional<T> 
collect(Optional<S>,Closure<T>)` is not that valuable. If deprecated, it would 
not resolve as an extension, which would then cause `List<T> 
collect(Object,Closure<T>)` to be selected instead. I doubt any code that makes 
use of this is prepared for a list return value.
   
   Yes, it would be a breaking change. We'd deprecate it now in Groovy 4 and 
remove in Groovy 5 with explanation in release notes. Folks wanting to prepare 
could potentially test with -Dgroovy.extension.disable=collect but that isn't 
very selective.
   We can explain the behavior either way, I just think the explanation is much 
simpler if it behaves like all the other fallback variants.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to