Index: trunk/modules/luni/src/main/java/java/util/Collections.java =================================================================== --- trunk/modules/luni/src/main/java/java/util/Collections.java (revision 377721) +++ trunk/modules/luni/src/main/java/java/util/Collections.java (working copy) @@ -1968,6 +1968,8 @@ * @return a synchronized Collection */ public static Collection synchronizedCollection(Collection collection) { + if (collection == null) + throw new NullPointerException(); return new SynchronizedCollection(collection); } @@ -1997,6 +1999,8 @@ * @return a synchronized Map */ public static Map synchronizedMap(Map map) { + if (map == null) + throw new NullPointerException(); return new SynchronizedMap(map); } @@ -2009,6 +2013,8 @@ * @return a synchronized Set */ public static Set synchronizedSet(Set set) { + if (set == null) + throw new NullPointerException(); return new SynchronizedSet(set); } @@ -2021,6 +2027,8 @@ * @return a synchronized SortedMap */ public static SortedMap synchronizedSortedMap(SortedMap map) { + if (map == null) + throw new NullPointerException(); return new SynchronizedSortedMap(map); } @@ -2033,6 +2041,8 @@ * @return a synchronized SortedSet */ public static SortedSet synchronizedSortedSet(SortedSet set) { + if (set == null) + throw new NullPointerException(); return new SynchronizedSortedSet(set); } @@ -2046,6 +2056,8 @@ * @return an unmodifiable Collection */ public static Collection unmodifiableCollection(Collection collection) { + if (collection == null) + throw new NullPointerException(); return new UnmodifiableCollection(collection); } @@ -2077,6 +2089,8 @@ * @return a unmodifiable Map */ public static Map unmodifiableMap(Map map) { + if (map == null) + throw new NullPointerException(); return new UnmodifiableMap(map); } @@ -2090,6 +2104,8 @@ * @return a unmodifiable Set */ public static Set unmodifiableSet(Set set) { + if (set == null) + throw new NullPointerException(); return new UnmodifiableSet(set); } @@ -2103,6 +2119,8 @@ * @return a unmodifiable SortedMap */ public static SortedMap unmodifiableSortedMap(SortedMap map) { + if (map == null) + throw new NullPointerException(); return new UnmodifiableSortedMap(map); } @@ -2116,6 +2134,8 @@ * @return a unmodifiable SortedSet */ public static SortedSet unmodifiableSortedSet(SortedSet set) { + if (set == null) + throw new NullPointerException(); return new UnmodifiableSortedSet(set); } }