[ https://issues.apache.org/jira/browse/MNG-8483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17910168#comment-17910168 ]
Guillaume Nodet commented on MNG-8483: -------------------------------------- No real issue from my side. Though I wonder if it would make sense to delegate the {{Objects}} method and do something like {code} public static <T> T nonNull(T obj, String field) { return Objects.requireNonNull(obj, field != null ? field + " cannot be null" : null); } {code} to streamline the calling code a bit from {code} Objects.requireNonNull(field, "field cannot be null") {code} to {code} nonNull(field, "field") {code} > BaseRequest.nonNull should be removed > ------------------------------------- > > Key: MNG-8483 > URL: https://issues.apache.org/jira/browse/MNG-8483 > Project: Maven > Issue Type: Bug > Components: API > Affects Versions: 4.0.0-rc-2 > Reporter: Elliotte Rusty Harold > Assignee: Elliotte Rusty Harold > Priority: Blocker > Fix For: 4.0.0-rc-3 > > > Aside from throwing the wrong exception type, this just reinvents > Objects.requireNonNull that we've had since Java 8. -- This message was sent by Atlassian Jira (v8.20.10#820010)