--- old/src/share/classes/java/util/Map.java 2013-08-26 20:48:28.141105257 -0700 +++ new/src/share/classes/java/util/Map.java 2013-08-26 20:48:27.973105248 -0700 @@ -805,6 +805,10 @@ * return false; * } * + * The default implementation does not throw NullPointerException + * for maps that do not support null values if oldValue is null unless + * newValue is also null. + * * @param key key with which the specified value is associated * @param oldValue value expected to be associated with the specified key * @param newValue value to be associated with the specified key @@ -814,8 +818,11 @@ * (optional) * @throws ClassCastException if the class of a specified key or value * prevents it from being stored in this map - * @throws NullPointerException if a specified key or value is null, + * @throws NullPointerException if a specified key or newValue is null, * and this map does not permit null keys or values + * @throws NullPointerException if oldValue is null and this map does not + * permit null values + * (optional) * @throws IllegalArgumentException if some property of a specified key * or value prevents it from being stored in this map * @since 1.8