src/java.prefs/share/classes/java/util/prefs/Preferences.java

Print this page
rev 11676 : 8075156: (prefs) remove() should disallow the use of the null control character '\u0000' as key
Summary: Extend disallowing null control character key to remove()
Reviewed-by: XXX

*** 528,537 **** --- 528,539 ---- * * @param key key whose mapping is to be removed from the preference node. * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>. * @throws IllegalStateException if this node (or an ancestor) has been * removed with the {@link #removeNode()} method. + * @throws IllegalArgumentException if the key contains the null control + * character, code point U+0000. */ public abstract void remove(String key); /** * Removes all of the preferences (key-value associations) in this