ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentLinkedDeque.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentLinkedDeque.java (file contents):
Revision 1.51 by jsr166, Tue Nov 11 04:39:30 2014 UTC vs.
Revision 1.52 by jsr166, Sun Nov 23 17:44:51 2014 UTC

# Line 1068 | Line 1068 | public class ConcurrentLinkedDeque<E>
1068       * @return {@code true} if this deque contains the specified element
1069       */
1070      public boolean contains(Object o) {
1071 <        if (o == null) return false;
1072 <        for (Node<E> p = first(); p != null; p = succ(p)) {
1073 <            E item = p.item;
1074 <            if (item != null && o.equals(item))
1075 <                return true;
1071 >        if (o != null) {
1072 >            for (Node<E> p = first(); p != null; p = succ(p)) {
1073 >                E item = p.item;
1074 >                if (item != null && o.equals(item))
1075 >                    return true;
1076 >            }
1077          }
1078          return false;
1079      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines