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_r350237710
 
 

 ##########
 File path: 
src/main/java/org/apache/commons/collections4/list/AbstractLinkedList.java
 ##########
 @@ -387,7 +388,7 @@ public boolean equals(final Object obj) {
         while (it1.hasNext() && it2.hasNext()) {
             final Object o1 = it1.next();
             final Object o2 = it2.next();
-            if (!(o1 == null ? o2 == null : o1.equals(o2))) {
+            if (!(Objects.equals(o1, o2))) {
 
 Review comment:
   How about in-lining `o1` and `o2` since they are not reused?

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