garydgregory commented on PR #1435:
URL: https://github.com/apache/commons-lang/pull/1435#issuecomment-3219890389

   Hello @richdougherty 
   
   Thanks for the detailed reply.
   
   Looking over what we have in the library, it now looks like we should not 
put this in `ObjectUtils`, it's not about any old objects, it's about 
functions, so `org.apache.commons.lang3.function.Functions` and `Failable` are 
better homes where you'll find:
   - `Functions.apply(Function<T, R>, T)`
   - `Failable.apply(FailableFunction<T, R, E>, T)`
   
   Now, we'd add a `[Functions|Failable].applyNonNull(Function<T, R>, T)`
   
   Note that the `Failable` APIs don't throw checked exceptions, which is why 
you can get away with declaring a single API if desired.
   
   I don't think the Javadoc should document "alternatives"; that's confusing. 
It might be 
   OK to say "shorthand for..." with short examples; we already do that in some 
APIs, IIRC.
   
   I wonder how long it will be until someone asks about a `BiFunction` version 
😉 Not for now.


-- 
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