From 0670078bb6530dd00d5b0c537ccf0538231f74e8 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 8 Jul 2014 16:46:10 +0200 Subject: [PATCH] Remove wrong javadoc comment Contrary to what the comment of SharedPreferences.Editor.putString() says, a call to putString(key, null) is not equivalent to remove(key), at least with SharedPreferencesImpl, backed by a HashMap. Instead, it associates a null item to the key. Signed-off-by: Romain Vimont --- core/java/android/content/SharedPreferences.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/java/android/content/SharedPreferences.java b/core/java/android/content/SharedPreferences.java index d4f7f06b008d1..49c7d7a38d475 100644 --- a/core/java/android/content/SharedPreferences.java +++ b/core/java/android/content/SharedPreferences.java @@ -71,9 +71,7 @@ public interface SharedPreferences { * {@link #commit} or {@link #apply} are called. * * @param key The name of the preference to modify. - * @param value The new value for the preference. Supplying {@code null} - * as the value is equivalent to calling {@link #remove(String)} with - * this key. + * @param value The new value for the preference. * * @return Returns a reference to the same Editor object, so you can * chain put calls together.