You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/12/29 15:50:19 UTC

[GitHub] [commons-lang] garydgregory edited a comment on pull request #684: [LANG-1634] Add ObjectUtils #applyIfNonNull and #applyFirstNonNull

garydgregory edited a comment on pull request #684:
URL: https://github.com/apache/commons-lang/pull/684#issuecomment-752129692


   It seems to me the true test of a new API like `applyIfNonNull` is where can it be used within Commons Lang, if we don't eat our own dog food, it seems odd to tell others to do so. IOW, I'd like to see this PR include using this API.
   
   I'm not convinced as to the utility of `applyFirstNonNull`, see above.
   
   Also, for my money, I'd flip the arguments:
   ```
   ObjectUtils.applyIfNonNull(null, bean::setValue);
   ```
   Which reads to me like "if the object is non-null, then apply the function".


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org