garydgregory commented on a change in pull request #118: Fixed the typo and 
deal the NPE with Objects.requireNonNull 
URL: 
https://github.com/apache/commons-collections/pull/118#discussion_r400250988
 
 

 ##########
 File path: 
src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java
 ##########
 @@ -514,6 +513,8 @@ protected void addNodeAfter(final Node<E> node, final E 
value) {
      * @throws NullPointerException if either node is null
      */
     protected void addNode(final Node<E> nodeToInsert, final Node<E> 
insertBeforeNode) {
+        Objects.requireNonNull(nodeToInsert, "The new node to insert must not 
be null.");
 
 Review comment:
   Keep it simple: `Objects.requireNonNull(nodeToInsert, "nodeToInsert");`
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to