OSDN Git Service

Small speedup in getAsString and comment fix
authorDaniel Lehmann <lehmannd@google.com>
Tue, 23 Mar 2010 03:35:02 +0000 (20:35 -0700)
committerDaniel Lehmann <lehmannd@google.com>
Tue, 23 Mar 2010 18:20:45 +0000 (11:20 -0700)
Change-Id: I19744983bbc0f4b9060de326bd539137e373415b

core/java/android/content/ContentValues.java

index c04625d..75787cd 100644 (file)
@@ -66,7 +66,7 @@ public final class ContentValues implements Parcelable {
      * Creates a set of values copied from the given HashMap. This is used
      * by the Parcel unmarshalling code.
      *
-     * @param from the values to start with
+     * @param values the values to start with
      * {@hide}
      */
     private ContentValues(HashMap<String, Object> values) {
@@ -248,7 +248,7 @@ public final class ContentValues implements Parcelable {
      */
     public String getAsString(String key) {
         Object value = mValues.get(key);
-        return value != null ? mValues.get(key).toString() : null;
+        return value != null ? value.toString() : null;
     }
 
     /**