From ca2197b0457b1626b95a053d835ceaca43ac0286 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Thu, 19 Jun 2014 10:46:00 +0100 Subject: [PATCH] Update javadoc for android.os.Bundle. Call out the fact that defaultValue is returned if a null mapping exists for a given key. bug: https://code.google.com/p/android/issues/detail?id=68453 Change-Id: Ifa6e94c1dee47809f70cadcb668cb98cb8dbef14 --- core/java/android/os/Bundle.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java index af57507b87823..fd1df9238a9dd 100644 --- a/core/java/android/os/Bundle.java +++ b/core/java/android/os/Bundle.java @@ -1127,10 +1127,12 @@ public final class Bundle implements Parcelable, Cloneable { /** * Returns the value associated with the given key, or defaultValue if - * no mapping of the desired type exists for the given key. + * no mapping of the desired type exists for the given key or if a null + * value is explicitly associated with the given key. * * @param key a String, or null - * @param defaultValue Value to return if key does not exist + * @param defaultValue Value to return if key does not exist or if a null + * value is associated with the given key. * @return the String value associated with the given key, or defaultValue * if no valid String object is currently mapped to that key. */ @@ -1160,10 +1162,12 @@ public final class Bundle implements Parcelable, Cloneable { /** * Returns the value associated with the given key, or defaultValue if - * no mapping of the desired type exists for the given key. + * no mapping of the desired type exists for the given key or if a null + * value is explicitly associatd with the given key. * * @param key a String, or null - * @param defaultValue Value to return if key does not exist + * @param defaultValue Value to return if key does not exist or if a null + * value is associated with the given key. * @return the CharSequence value associated with the given key, or defaultValue * if no valid CharSequence object is currently mapped to that key. */