diff options
author | Dan Egnor <egnor@google.com> | 2010-03-09 09:18:44 -0800 |
---|---|---|
committer | Dan Egnor <egnor@google.com> | 2010-03-09 09:18:44 -0800 |
commit | ca9d5e7643b8720950ece7ecdc10cba9e566cc01 (patch) | |
tree | 8b75f4cde989bb48e01481dabde462db7e4cb4d9 | |
parent | a4cf386f4595450ea844929867c042ca0fa35878 (diff) | |
download | android_external_guava-ca9d5e7643b8720950ece7ecdc10cba9e566cc01.tar.gz android_external_guava-ca9d5e7643b8720950ece7ecdc10cba9e566cc01.tar.bz2 android_external_guava-ca9d5e7643b8720950ece7ecdc10cba9e566cc01.zip |
Modify Immutable* classes to (hopefully) compile on the Mac build
servers (whatever weird Java version they're using).
Change-Id: I7ed1872f6490df3db879ad7600b1bfc7aaa929b1
-rw-r--r-- | README.android | 5 | ||||
-rw-r--r-- | src/com/google/common/collect/ImmutableList.java | 4 | ||||
-rw-r--r-- | src/com/google/common/collect/ImmutableListMultimap.java | 4 | ||||
-rw-r--r-- | src/com/google/common/collect/ImmutableMap.java | 4 | ||||
-rw-r--r-- | src/com/google/common/collect/ImmutableMultiset.java | 4 | ||||
-rw-r--r-- | src/com/google/common/collect/ImmutableSet.java | 4 | ||||
-rw-r--r-- | src/com/google/common/collect/ImmutableSetMultimap.java | 4 |
7 files changed, 22 insertions, 7 deletions
diff --git a/README.android b/README.android index 10e5c95..3a51fda 100644 --- a/README.android +++ b/README.android @@ -2,7 +2,10 @@ URL: http://code.google.com/p/guava-libraries/source/checkout Version: r11 License: Apache 2 Description: "Guava: Google Core Libraries for Java 1.5" -Local Modifications: No local modifications + +Local Modifications: Minor hacks to compile on our Mac build machines -- + see src/com/google/common/collect/Immutable*.java, look for + "BEGIN/END android-changed" markers. Guava-libraries are a grab bag of utility libraries published by Google as open source, including among other things the Google collections libraries. diff --git a/src/com/google/common/collect/ImmutableList.java b/src/com/google/common/collect/ImmutableList.java index d6ae770..2957fa5 100644 --- a/src/com/google/common/collect/ImmutableList.java +++ b/src/com/google/common/collect/ImmutableList.java @@ -64,7 +64,9 @@ public abstract class ImmutableList<E> extends ImmutableCollection<E> // Casting to any type is safe because the list will never hold any elements. @SuppressWarnings("unchecked") public static <E> ImmutableList<E> of() { - return (ImmutableList<E>) EmptyImmutableList.INSTANCE; + // BEGIN android-changed + return (ImmutableList) EmptyImmutableList.INSTANCE; + // END android-changed } /** diff --git a/src/com/google/common/collect/ImmutableListMultimap.java b/src/com/google/common/collect/ImmutableListMultimap.java index b3dd9ab..6d0ec60 100644 --- a/src/com/google/common/collect/ImmutableListMultimap.java +++ b/src/com/google/common/collect/ImmutableListMultimap.java @@ -55,7 +55,9 @@ public class ImmutableListMultimap<K, V> // Casting is safe because the multimap will never hold any elements. @SuppressWarnings("unchecked") public static <K, V> ImmutableListMultimap<K, V> of() { - return (ImmutableListMultimap<K, V>) EmptyImmutableListMultimap.INSTANCE; + // BEGIN android-changed + return (ImmutableListMultimap) EmptyImmutableListMultimap.INSTANCE; + // END android-changed } /** diff --git a/src/com/google/common/collect/ImmutableMap.java b/src/com/google/common/collect/ImmutableMap.java index 12174d0..b842b8c 100644 --- a/src/com/google/common/collect/ImmutableMap.java +++ b/src/com/google/common/collect/ImmutableMap.java @@ -59,7 +59,9 @@ public abstract class ImmutableMap<K, V> implements Map<K, V>, Serializable { // Casting to any type is safe because the set will never hold any elements. @SuppressWarnings("unchecked") public static <K, V> ImmutableMap<K, V> of() { - return (ImmutableMap<K, V>) EmptyImmutableMap.INSTANCE; + // BEGIN android-changed + return (ImmutableMap) EmptyImmutableMap.INSTANCE; + // END android-changed } /** diff --git a/src/com/google/common/collect/ImmutableMultiset.java b/src/com/google/common/collect/ImmutableMultiset.java index ca1028d..543b37b 100644 --- a/src/com/google/common/collect/ImmutableMultiset.java +++ b/src/com/google/common/collect/ImmutableMultiset.java @@ -51,7 +51,9 @@ public class ImmutableMultiset<E> extends ImmutableCollection<E> */ @SuppressWarnings("unchecked") // all supported methods are covariant public static <E> ImmutableMultiset<E> of() { - return (ImmutableMultiset<E>) EmptyImmutableMultiset.INSTANCE; + // BEGIN android-changed + return (ImmutableMultiset) EmptyImmutableMultiset.INSTANCE; + // END android-changed } /** diff --git a/src/com/google/common/collect/ImmutableSet.java b/src/com/google/common/collect/ImmutableSet.java index eaeea00..855ba13 100644 --- a/src/com/google/common/collect/ImmutableSet.java +++ b/src/com/google/common/collect/ImmutableSet.java @@ -74,7 +74,9 @@ public abstract class ImmutableSet<E> extends ImmutableCollection<E> // Casting to any type is safe because the set will never hold any elements. @SuppressWarnings({"unchecked"}) public static <E> ImmutableSet<E> of() { - return (ImmutableSet<E>) EmptyImmutableSet.INSTANCE; + // BEGIN android-changed + return (ImmutableSet) EmptyImmutableSet.INSTANCE; + // END android-changed } /** diff --git a/src/com/google/common/collect/ImmutableSetMultimap.java b/src/com/google/common/collect/ImmutableSetMultimap.java index eb99796..325afff 100644 --- a/src/com/google/common/collect/ImmutableSetMultimap.java +++ b/src/com/google/common/collect/ImmutableSetMultimap.java @@ -58,7 +58,9 @@ public class ImmutableSetMultimap<K, V> // Casting is safe because the multimap will never hold any elements. @SuppressWarnings("unchecked") public static <K, V> ImmutableSetMultimap<K, V> of() { - return (ImmutableSetMultimap<K, V>) EmptyImmutableSetMultimap.INSTANCE; + // BEGIN android-changed + return (ImmutableSetMultimap) EmptyImmutableSetMultimap.INSTANCE; + // END android-changed } /** |