8245694: java.util.Properties.entrySet() does not override Object methods

Add missing override methods

Reviewed-by: bchristi, jboes
This commit is contained in:
Yu Li 2020-07-20 13:11:09 +01:00 committed by Julia Boes
parent 99eccaf6ec
commit 907719baec
2 changed files with 216 additions and 0 deletions

View file

@ -1404,6 +1404,21 @@ public class Properties extends Hashtable<Object,Object> {
return entrySet.containsAll(c);
}
@Override
public boolean equals(Object o) {
return o == this || entrySet.equals(o);
}
@Override
public int hashCode() {
return entrySet.hashCode();
}
@Override
public String toString() {
return entrySet.toString();
}
@Override
public boolean removeAll(Collection<?> c) {
return entrySet.removeAll(c);