diff -r 67aa4920495c -r aa5490a167ee jdk/src/java.base/share/classes/java/util/Vector.java --- a/jdk/src/java.base/share/classes/java/util/Vector.java Tue Aug 11 08:48:18 2015 -0400 +++ b/jdk/src/java.base/share/classes/java/util/Vector.java Tue Aug 11 20:46:46 2015 +0300 @@ -365,7 +365,7 @@ * Returns {@code true} if this vector contains the specified element. * More formally, returns {@code true} if and only if this vector * contains at least one element {@code e} such that - * (o==null ? e==null : o.equals(e)). + * {@code Objects.equals(o, e)}. * * @param o element whose presence in this vector is to be tested * @return {@code true} if this vector contains the specified element @@ -378,7 +378,7 @@ * Returns the index of the first occurrence of the specified element * in this vector, or -1 if this vector does not contain the element. * More formally, returns the lowest index {@code i} such that - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for @@ -394,7 +394,7 @@ * this vector, searching forwards from {@code index}, or returns -1 if * the element is not found. * More formally, returns the lowest index {@code i} such that - * (i >= index && (o==null ? get(i)==null : o.equals(get(i)))), + * {@code (i >= index && Objects.equals(o, get(i)))}, * or -1 if there is no such index. * * @param o element to search for @@ -422,7 +422,7 @@ * Returns the index of the last occurrence of the specified element * in this vector, or -1 if this vector does not contain the element. * More formally, returns the highest index {@code i} such that - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for @@ -438,7 +438,7 @@ * this vector, searching backwards from {@code index}, or returns -1 if * the element is not found. * More formally, returns the highest index {@code i} such that - * (i <= index && (o==null ? get(i)==null : o.equals(get(i)))), + * {@code (i <= index && Objects.equals(o, get(i)))}, * or -1 if there is no such index. * * @param o element to search for @@ -798,7 +798,7 @@ * Removes the first occurrence of the specified element in this Vector * If the Vector does not contain the element, it is unchanged. More * formally, removes the element with the lowest index i such that - * {@code (o==null ? get(i)==null : o.equals(get(i)))} (if such + * {@code Objects.equals(o, get(i))} (if such * an element exists). * * @param o element to be removed from this Vector, if present @@ -991,8 +991,8 @@ * true if and only if the specified Object is also a List, both Lists * have the same size, and all corresponding pairs of elements in the two * Lists are equal. (Two elements {@code e1} and - * {@code e2} are equal if {@code (e1==null ? e2==null : - * e1.equals(e2))}.) In other words, two Lists are defined to be + * {@code e2} are equal if {@code Objects.equals(e1, e2)}.) + * In other words, two Lists are defined to be * equal if they contain the same elements in the same order. * * @param o the Object to be compared for equality with this Vector