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_r400251714
##########
File path:
src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java
##########
@@ -529,6 +530,7 @@ protected void addNode(final Node<E> nodeToInsert, final
Node<E> insertBeforeNod
* @throws NullPointerException if {@code node} is null
*/
protected void removeNode(final Node<E> node) {
+ Objects.requireNonNull(node, "The new node to remove must not be
null.");
Review comment:
Keep it simple: `Objects.requireNonNull(node, "node");`
----------------------------------------------------------------
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