diff options
Diffstat (limited to 'core/java/android/net/Uri.java')
-rw-r--r-- | core/java/android/net/Uri.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java index 08bd67e..a490f73 100644 --- a/core/java/android/net/Uri.java +++ b/core/java/android/net/Uri.java @@ -105,6 +105,18 @@ public abstract class Uri implements Parcelable, Comparable<Uri> { private static final String LOG = Uri.class.getSimpleName(); /** + * NOTE: EMPTY accesses this field during its own initialization, so this + * field *must* be initialized first, or else EMPTY will see a null value! + * + * Placeholder for strings which haven't been cached. This enables us + * to cache null. We intentionally create a new String instance so we can + * compare its identity and there is no chance we will confuse it with + * user data. + */ + @SuppressWarnings("RedundantStringConstructorCall") + private static final String NOT_CACHED = new String("NOT CACHED"); + + /** * The empty URI, equivalent to "". */ public static final Uri EMPTY = new HierarchicalUri(null, Part.NULL, @@ -350,15 +362,6 @@ public abstract class Uri implements Parcelable, Comparable<Uri> { private final static int NOT_CALCULATED = -2; /** - * Placeholder for strings which haven't been cached. This enables us - * to cache null. We intentionally create a new String instance so we can - * compare its identity and there is no chance we will confuse it with - * user data. - */ - @SuppressWarnings("RedundantStringConstructorCall") - private static final String NOT_CACHED = new String("NOT CACHED"); - - /** * Error message presented when a user tries to treat an opaque URI as * hierarchical. */ |