diff --git a/android/guava/src/com/google/common/collect/Comparators.java b/android/guava/src/com/google/common/collect/Comparators.java index 5f5dc79deee2..f40e6b9fb258 100644 --- a/android/guava/src/com/google/common/collect/Comparators.java +++ b/android/guava/src/com/google/common/collect/Comparators.java @@ -129,7 +129,7 @@ private Comparators() {} * @throws IllegalArgumentException if {@code k < 0} * @since 33.2.0 (available since 22.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> least( int k, Comparator comparator) { @@ -163,7 +163,7 @@ private Comparators() {} * @throws IllegalArgumentException if {@code k < 0} * @since 33.2.0 (available since 22.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> greatest( int k, Comparator comparator) { @@ -183,7 +183,7 @@ private Comparators() {} * @throws ClassCastException if the parameters are not mutually comparable. * @since 30.0 */ - public static > T min(T a, T b) { + public static > T min(T a, T b) { return (a.compareTo(b) <= 0) ? a : b; } @@ -202,7 +202,7 @@ public static > T min(T a, T b) { * comparator. * @since 30.0 */ - @ParametricNullness + @ParametricNullness public static T min( @ParametricNullness T a, @ParametricNullness T b, Comparator comparator) { return (comparator.compare(a, b) <= 0) ? a : b; @@ -221,7 +221,7 @@ public static > T min(T a, T b) { * @throws ClassCastException if the parameters are not mutually comparable. * @since 30.0 */ - public static > T max(T a, T b) { + public static > T max(T a, T b) { return (a.compareTo(b) >= 0) ? a : b; } @@ -240,7 +240,7 @@ public static > T max(T a, T b) { * comparator. * @since 30.0 */ - @ParametricNullness + @ParametricNullness public static T max( @ParametricNullness T a, @ParametricNullness T b, Comparator comparator) { return (comparator.compare(a, b) >= 0) ? a : b; diff --git a/android/guava/src/com/google/common/collect/ImmutableBiMap.java b/android/guava/src/com/google/common/collect/ImmutableBiMap.java index c94e2e00a115..61a2d03492f5 100644 --- a/android/guava/src/com/google/common/collect/ImmutableBiMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableBiMap.java @@ -59,7 +59,7 @@ public abstract class ImmutableBiMap extends ImmutableMap implements * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableBiMap( diff --git a/android/guava/src/com/google/common/collect/ImmutableList.java b/android/guava/src/com/google/common/collect/ImmutableList.java index 943fdf74db4c..68fb827c35db 100644 --- a/android/guava/src/com/google/common/collect/ImmutableList.java +++ b/android/guava/src/com/google/common/collect/ImmutableList.java @@ -69,7 +69,7 @@ public abstract class ImmutableList extends ImmutableCollection * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableList() { return CollectCollectors.toImmutableList(); diff --git a/android/guava/src/com/google/common/collect/ImmutableListMultimap.java b/android/guava/src/com/google/common/collect/ImmutableListMultimap.java index 96cc17fe4c17..5d86817eb7cd 100644 --- a/android/guava/src/com/google/common/collect/ImmutableListMultimap.java +++ b/android/guava/src/com/google/common/collect/ImmutableListMultimap.java @@ -81,7 +81,7 @@ public class ImmutableListMultimap extends ImmutableMultimap * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableListMultimap( @@ -121,7 +121,7 @@ public class ImmutableListMultimap extends ImmutableMultimap * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> flatteningToImmutableListMultimap( diff --git a/android/guava/src/com/google/common/collect/ImmutableMap.java b/android/guava/src/com/google/common/collect/ImmutableMap.java index 6e29ed7782e9..47e7614f6a72 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableMap.java @@ -82,7 +82,7 @@ public abstract class ImmutableMap implements Map, Serializable { * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableMap( @@ -104,7 +104,7 @@ public abstract class ImmutableMap implements Map, Serializable { * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableMap( diff --git a/android/guava/src/com/google/common/collect/ImmutableMultiset.java b/android/guava/src/com/google/common/collect/ImmutableMultiset.java index 4d160805f3fd..fda6abb12d6a 100644 --- a/android/guava/src/com/google/common/collect/ImmutableMultiset.java +++ b/android/guava/src/com/google/common/collect/ImmutableMultiset.java @@ -67,7 +67,7 @@ public abstract class ImmutableMultiset extends ImmutableMultisetGwtSerializa * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableMultiset() { return CollectCollectors.toImmutableMultiset(Function.identity(), e -> 1); @@ -84,7 +84,7 @@ public abstract class ImmutableMultiset extends ImmutableMultisetGwtSerializa * * @since 33.2.0 (available since 22.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableMultiset( diff --git a/android/guava/src/com/google/common/collect/ImmutableRangeMap.java b/android/guava/src/com/google/common/collect/ImmutableRangeMap.java index 3c34a20ed1c1..a72904f22760 100644 --- a/android/guava/src/com/google/common/collect/ImmutableRangeMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableRangeMap.java @@ -58,7 +58,7 @@ public class ImmutableRangeMap, V> implements RangeMap, V> Collector> toImmutableRangeMap( diff --git a/android/guava/src/com/google/common/collect/ImmutableRangeSet.java b/android/guava/src/com/google/common/collect/ImmutableRangeSet.java index 9ff2e84fc496..79dc5c41ed10 100644 --- a/android/guava/src/com/google/common/collect/ImmutableRangeSet.java +++ b/android/guava/src/com/google/common/collect/ImmutableRangeSet.java @@ -67,7 +67,7 @@ public final class ImmutableRangeSet extends AbstractRange * * @since 33.2.0 (available since 23.1 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static > Collector, ?, ImmutableRangeSet> toImmutableRangeSet() { diff --git a/android/guava/src/com/google/common/collect/ImmutableSet.java b/android/guava/src/com/google/common/collect/ImmutableSet.java index d7d1f3572497..4bf8a751fe23 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSet.java +++ b/android/guava/src/com/google/common/collect/ImmutableSet.java @@ -61,7 +61,7 @@ public abstract class ImmutableSet extends ImmutableCollection implements * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableSet() { return CollectCollectors.toImmutableSet(); diff --git a/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java b/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java index e9f0295828d7..37c7f0c366f3 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java +++ b/android/guava/src/com/google/common/collect/ImmutableSetMultimap.java @@ -89,7 +89,7 @@ public class ImmutableSetMultimap extends ImmutableMultimap * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableSetMultimap( @@ -138,7 +138,7 @@ public class ImmutableSetMultimap extends ImmutableMultimap * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> flatteningToImmutableSetMultimap( diff --git a/android/guava/src/com/google/common/collect/ImmutableSortedMap.java b/android/guava/src/com/google/common/collect/ImmutableSortedMap.java index 24824e50923e..bccc8a074afb 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSortedMap.java +++ b/android/guava/src/com/google/common/collect/ImmutableSortedMap.java @@ -76,7 +76,7 @@ public final class ImmutableSortedMap extends ImmutableMap * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableSortedMap( @@ -97,7 +97,7 @@ public final class ImmutableSortedMap extends ImmutableMap * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableSortedMap( diff --git a/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java b/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java index 88dccbd46b6b..5da8f9c5ac60 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java +++ b/android/guava/src/com/google/common/collect/ImmutableSortedMultiset.java @@ -70,7 +70,7 @@ public abstract class ImmutableSortedMultiset extends ImmutableMultiset * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableSortedMultiset( Comparator comparator) { @@ -88,7 +88,7 @@ public abstract class ImmutableSortedMultiset extends ImmutableMultiset * * @since 33.2.0 (available since 22.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableSortedMultiset( diff --git a/android/guava/src/com/google/common/collect/ImmutableSortedSet.java b/android/guava/src/com/google/common/collect/ImmutableSortedSet.java index 1138621548b7..59940f317fed 100644 --- a/android/guava/src/com/google/common/collect/ImmutableSortedSet.java +++ b/android/guava/src/com/google/common/collect/ImmutableSortedSet.java @@ -72,7 +72,7 @@ public abstract class ImmutableSortedSet extends ImmutableSet * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableSortedSet( Comparator comparator) { diff --git a/android/guava/src/com/google/common/collect/ImmutableTable.java b/android/guava/src/com/google/common/collect/ImmutableTable.java index 6bcd17602151..27e17d3431f4 100644 --- a/android/guava/src/com/google/common/collect/ImmutableTable.java +++ b/android/guava/src/com/google/common/collect/ImmutableTable.java @@ -63,7 +63,7 @@ public abstract class ImmutableTable extends AbstractTable * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableTable( @@ -84,7 +84,7 @@ public abstract class ImmutableTable extends AbstractTable * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static Collector> toImmutableTable( diff --git a/android/guava/src/com/google/common/collect/Maps.java b/android/guava/src/com/google/common/collect/Maps.java index c181dbead0b3..5ba7ff2b2283 100644 --- a/android/guava/src/com/google/common/collect/Maps.java +++ b/android/guava/src/com/google/common/collect/Maps.java @@ -192,7 +192,7 @@ public static , V> ImmutableMap immutableEnumMap( * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static , V> Collector> toImmutableEnumMap( @@ -212,7 +212,7 @@ public static , V> ImmutableMap immutableEnumMap( * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static , V> Collector> toImmutableEnumMap( diff --git a/android/guava/src/com/google/common/collect/MoreCollectors.java b/android/guava/src/com/google/common/collect/MoreCollectors.java index 7429d16c85a0..0db61b6684ee 100644 --- a/android/guava/src/com/google/common/collect/MoreCollectors.java +++ b/android/guava/src/com/google/common/collect/MoreCollectors.java @@ -61,7 +61,7 @@ public final class MoreCollectors { * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be * {@code null}) and returns {@code Optional.empty()} if it has none. */ - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") public static Collector> toOptional() { return (Collector) TO_OPTIONAL; } @@ -84,7 +84,7 @@ public final class MoreCollectors { * returned collector throws an {@code IllegalArgumentException} if the stream consists of two or * more elements, and a {@code NoSuchElementException} if the stream is empty. */ - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") public static Collector onlyElement() { return (Collector) ONLY_ELEMENT; } diff --git a/android/guava/src/com/google/common/collect/Multimaps.java b/android/guava/src/com/google/common/collect/Multimaps.java index de03cdfabe9a..441c6c2d0089 100644 --- a/android/guava/src/com/google/common/collect/Multimaps.java +++ b/android/guava/src/com/google/common/collect/Multimaps.java @@ -110,7 +110,7 @@ private Multimaps() {} * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static < T extends @Nullable Object, @@ -157,7 +157,7 @@ private Multimaps() {} * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static < T extends @Nullable Object, diff --git a/android/guava/src/com/google/common/collect/Multisets.java b/android/guava/src/com/google/common/collect/Multisets.java index 9e8e82684d4b..f73b9a22c805 100644 --- a/android/guava/src/com/google/common/collect/Multisets.java +++ b/android/guava/src/com/google/common/collect/Multisets.java @@ -80,7 +80,7 @@ private Multisets() {} * * @since 33.2.0 (available since 22.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static > Collector toMultiset( diff --git a/android/guava/src/com/google/common/collect/Sets.java b/android/guava/src/com/google/common/collect/Sets.java index 536114cfc280..0cecc57cf84a 100644 --- a/android/guava/src/com/google/common/collect/Sets.java +++ b/android/guava/src/com/google/common/collect/Sets.java @@ -147,7 +147,7 @@ public static > ImmutableSet immutableEnumSet(Iterable e * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static > Collector> toImmutableEnumSet() { return CollectCollectors.toImmutableEnumSet(); diff --git a/android/guava/src/com/google/common/collect/Tables.java b/android/guava/src/com/google/common/collect/Tables.java index 7398e8c9b774..69fe5897e4c3 100644 --- a/android/guava/src/com/google/common/collect/Tables.java +++ b/android/guava/src/com/google/common/collect/Tables.java @@ -66,7 +66,7 @@ private Tables() {} * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static < T extends @Nullable Object, @@ -97,7 +97,7 @@ private Tables() {} * * @since 33.2.0 (available since 21.0 in guava-jre) */ - @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) + @SuppressWarnings({"AndroidJdkLibsChecker", "Java7ApiChecker"}) @IgnoreJRERequirement // Users will use this only if they're already using streams. public static < T extends @Nullable Object, diff --git a/android/guava/src/com/google/common/primitives/Chars.java b/android/guava/src/com/google/common/primitives/Chars.java index a85526f85b85..7b5f94d80f86 100644 --- a/android/guava/src/com/google/common/primitives/Chars.java +++ b/android/guava/src/com/google/common/primitives/Chars.java @@ -214,7 +214,7 @@ private static int lastIndexOf(char[] array, char target, int start, int end) { * the array * @throws IllegalArgumentException if {@code array} is empty */ - public static char min(char... array) { + public static char min(char... array) { checkArgument(array.length > 0); char min = array[0]; for (int i = 1; i < array.length; i++) { @@ -233,7 +233,7 @@ public static char min(char... array) { * in the array * @throws IllegalArgumentException if {@code array} is empty */ - public static char max(char... array) { + public static char max(char... array) { checkArgument(array.length > 0); char max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/Doubles.java b/android/guava/src/com/google/common/primitives/Doubles.java index cbb160612b8c..7d20829d347b 100644 --- a/android/guava/src/com/google/common/primitives/Doubles.java +++ b/android/guava/src/com/google/common/primitives/Doubles.java @@ -210,7 +210,7 @@ private static int lastIndexOf(double[] array, double target, int start, int end */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static double min(double... array) { + public static double min(double... array) { checkArgument(array.length > 0); double min = array[0]; for (int i = 1; i < array.length; i++) { @@ -230,7 +230,7 @@ public static double min(double... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static double max(double... array) { + public static double max(double... array) { checkArgument(array.length > 0); double max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/Floats.java b/android/guava/src/com/google/common/primitives/Floats.java index 30cee7fad74b..3e6c86490d10 100644 --- a/android/guava/src/com/google/common/primitives/Floats.java +++ b/android/guava/src/com/google/common/primitives/Floats.java @@ -207,7 +207,7 @@ private static int lastIndexOf(float[] array, float target, int start, int end) */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static float min(float... array) { + public static float min(float... array) { checkArgument(array.length > 0); float min = array[0]; for (int i = 1; i < array.length; i++) { @@ -227,7 +227,7 @@ public static float min(float... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static float max(float... array) { + public static float max(float... array) { checkArgument(array.length > 0); float max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/Ints.java b/android/guava/src/com/google/common/primitives/Ints.java index 0406a6a1d806..fd4ca7922ddf 100644 --- a/android/guava/src/com/google/common/primitives/Ints.java +++ b/android/guava/src/com/google/common/primitives/Ints.java @@ -221,7 +221,7 @@ private static int lastIndexOf(int[] array, int target, int start, int end) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static int min(int... array) { + public static int min(int... array) { checkArgument(array.length > 0); int min = array[0]; for (int i = 1; i < array.length; i++) { @@ -242,7 +242,7 @@ public static int min(int... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static int max(int... array) { + public static int max(int... array) { checkArgument(array.length > 0); int max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/Longs.java b/android/guava/src/com/google/common/primitives/Longs.java index 41aaaaa87f59..4ef6c7cfa959 100644 --- a/android/guava/src/com/google/common/primitives/Longs.java +++ b/android/guava/src/com/google/common/primitives/Longs.java @@ -190,7 +190,7 @@ private static int lastIndexOf(long[] array, long target, int start, int end) { * the array * @throws IllegalArgumentException if {@code array} is empty */ - public static long min(long... array) { + public static long min(long... array) { checkArgument(array.length > 0); long min = array[0]; for (int i = 1; i < array.length; i++) { @@ -209,7 +209,7 @@ public static long min(long... array) { * in the array * @throws IllegalArgumentException if {@code array} is empty */ - public static long max(long... array) { + public static long max(long... array) { checkArgument(array.length > 0); long max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/Shorts.java b/android/guava/src/com/google/common/primitives/Shorts.java index 3a1f9167b8c2..6e97371141d4 100644 --- a/android/guava/src/com/google/common/primitives/Shorts.java +++ b/android/guava/src/com/google/common/primitives/Shorts.java @@ -220,7 +220,7 @@ private static int lastIndexOf(short[] array, short target, int start, int end) */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static short min(short... array) { + public static short min(short... array) { checkArgument(array.length > 0); short min = array[0]; for (int i = 1; i < array.length; i++) { @@ -241,7 +241,7 @@ public static short min(short... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static short max(short... array) { + public static short max(short... array) { checkArgument(array.length > 0); short max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/SignedBytes.java b/android/guava/src/com/google/common/primitives/SignedBytes.java index 5fb4de8b0d13..5fabaab6bd93 100644 --- a/android/guava/src/com/google/common/primitives/SignedBytes.java +++ b/android/guava/src/com/google/common/primitives/SignedBytes.java @@ -103,7 +103,7 @@ public static int compare(byte a, byte b) { * the array * @throws IllegalArgumentException if {@code array} is empty */ - public static byte min(byte... array) { + public static byte min(byte... array) { checkArgument(array.length > 0); byte min = array[0]; for (int i = 1; i < array.length; i++) { @@ -122,7 +122,7 @@ public static byte min(byte... array) { * in the array * @throws IllegalArgumentException if {@code array} is empty */ - public static byte max(byte... array) { + public static byte max(byte... array) { checkArgument(array.length > 0); byte max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/UnsignedBytes.java b/android/guava/src/com/google/common/primitives/UnsignedBytes.java index 49d9a9135d7d..75e0266047a0 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/android/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -135,7 +135,7 @@ public static int compare(byte a, byte b) { * the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static byte min(byte... array) { + public static byte min(byte... array) { checkArgument(array.length > 0); int min = toInt(array[0]); for (int i = 1; i < array.length; i++) { @@ -155,7 +155,7 @@ public static byte min(byte... array) { * in the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static byte max(byte... array) { + public static byte max(byte... array) { checkArgument(array.length > 0); int max = toInt(array[0]); for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/UnsignedInts.java b/android/guava/src/com/google/common/primitives/UnsignedInts.java index e2f60af51ea3..81771dc4c8c2 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedInts.java +++ b/android/guava/src/com/google/common/primitives/UnsignedInts.java @@ -121,7 +121,7 @@ public static int saturatedCast(long value) { * the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static int min(int... array) { + public static int min(int... array) { checkArgument(array.length > 0); int min = flip(array[0]); for (int i = 1; i < array.length; i++) { @@ -141,7 +141,7 @@ public static int min(int... array) { * in the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static int max(int... array) { + public static int max(int... array) { checkArgument(array.length > 0); int max = flip(array[0]); for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/primitives/UnsignedLongs.java b/android/guava/src/com/google/common/primitives/UnsignedLongs.java index d44e66630d52..bb806c0773ed 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedLongs.java +++ b/android/guava/src/com/google/common/primitives/UnsignedLongs.java @@ -86,7 +86,7 @@ public static int compare(long a, long b) { * the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static long min(long... array) { + public static long min(long... array) { checkArgument(array.length > 0); long min = flip(array[0]); for (int i = 1; i < array.length; i++) { @@ -106,7 +106,7 @@ public static long min(long... array) { * in the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static long max(long... array) { + public static long max(long... array) { checkArgument(array.length > 0); long max = flip(array[0]); for (int i = 1; i < array.length; i++) { diff --git a/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java b/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java index 39ef09a905f0..545c28d1079d 100644 --- a/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/ClosingFuture.java @@ -821,7 +821,7 @@ public String toString() { * @param function transforms the value of a {@code ClosingFuture} step to a {@link * ListenableFuture} with the value of a derived step */ - public static + public static AsyncClosingFunction withoutCloser(final AsyncFunction function) { checkNotNull(function); return new AsyncClosingFunction() { diff --git a/android/guava/src/com/google/common/util/concurrent/Futures.java b/android/guava/src/com/google/common/util/concurrent/Futures.java index 43999328a716..39e54f064606 100644 --- a/android/guava/src/com/google/common/util/concurrent/Futures.java +++ b/android/guava/src/com/google/common/util/concurrent/Futures.java @@ -129,7 +129,7 @@ private Futures() {} * getters just return the value. This {@code Future} can't be canceled or timed out and its * {@code isDone()} method always returns {@code true}. */ - public static ListenableFuture immediateFuture( + public static ListenableFuture immediateFuture( @ParametricNullness V value) { if (value == null) { // This cast is safe because null is assignable to V for all V (i.e. it is bivariant) @@ -158,7 +158,7 @@ private Futures() {} * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code * Throwable} wrapped in an {@code ExecutionException}. */ - public static ListenableFuture immediateFailedFuture( + public static ListenableFuture immediateFailedFuture( Throwable throwable) { checkNotNull(throwable); return new ImmediateFailedFuture<>(throwable); @@ -171,7 +171,7 @@ private Futures() {} * @since 14.0 */ @SuppressWarnings("unchecked") // ImmediateCancelledFuture can work with any type - public static ListenableFuture immediateCancelledFuture() { + public static ListenableFuture immediateCancelledFuture() { ListenableFuture instance = ImmediateCancelledFuture.INSTANCE; if (instance != null) { return (ListenableFuture) instance; diff --git a/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java b/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java index 1aef0392cab2..064537badcde 100644 --- a/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java +++ b/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java @@ -263,7 +263,7 @@ private static void useDaemonThreadFactory(ThreadPoolExecutor executor) { * * @since 18.0 (present as MoreExecutors.sameThreadExecutor() since 10.0) */ - @GwtIncompatible // TODO + @GwtIncompatible // TODO public static ListeningExecutorService newDirectExecutorService() { return new DirectExecutorService(); } @@ -329,7 +329,7 @@ public static ListeningExecutorService newDirectExecutorService() { * * @since 18.0 */ - public static Executor directExecutor() { + public static Executor directExecutor() { return DirectExecutor.INSTANCE; } @@ -377,7 +377,7 @@ public static Executor directExecutor() { * * @since 23.3 (since 23.1 as {@code sequentialExecutor}) */ - @J2ktIncompatible + @J2ktIncompatible @GwtIncompatible public static Executor newSequentialExecutor(Executor delegate) { return new SequentialExecutor(delegate); diff --git a/guava/src/com/google/common/collect/Comparators.java b/guava/src/com/google/common/collect/Comparators.java index eefadf6d55c2..cc711c1e1be4 100644 --- a/guava/src/com/google/common/collect/Comparators.java +++ b/guava/src/com/google/common/collect/Comparators.java @@ -130,7 +130,7 @@ private Comparators() {} * @throws IllegalArgumentException if {@code k < 0} * @since 22.0 */ - public static Collector> least( + public static Collector> least( int k, Comparator comparator) { checkNonnegative(k, "k"); checkNotNull(comparator); @@ -162,7 +162,7 @@ private Comparators() {} * @throws IllegalArgumentException if {@code k < 0} * @since 22.0 */ - public static Collector> greatest( + public static Collector> greatest( int k, Comparator comparator) { return least(k, comparator.reversed()); } @@ -206,7 +206,7 @@ public static Comparator> emptiesLast(Comparator valu * @throws ClassCastException if the parameters are not mutually comparable. * @since 30.0 */ - public static > T min(T a, T b) { + public static > T min(T a, T b) { return (a.compareTo(b) <= 0) ? a : b; } @@ -225,7 +225,7 @@ public static > T min(T a, T b) { * comparator. * @since 30.0 */ - @ParametricNullness + @ParametricNullness public static T min( @ParametricNullness T a, @ParametricNullness T b, Comparator comparator) { return (comparator.compare(a, b) <= 0) ? a : b; @@ -244,7 +244,7 @@ public static > T min(T a, T b) { * @throws ClassCastException if the parameters are not mutually comparable. * @since 30.0 */ - public static > T max(T a, T b) { + public static > T max(T a, T b) { return (a.compareTo(b) >= 0) ? a : b; } @@ -263,7 +263,7 @@ public static > T max(T a, T b) { * comparator. * @since 30.0 */ - @ParametricNullness + @ParametricNullness public static T max( @ParametricNullness T a, @ParametricNullness T b, Comparator comparator) { return (comparator.compare(a, b) >= 0) ? a : b; diff --git a/guava/src/com/google/common/collect/ImmutableBiMap.java b/guava/src/com/google/common/collect/ImmutableBiMap.java index 89c13932ec10..f1777e62eb24 100644 --- a/guava/src/com/google/common/collect/ImmutableBiMap.java +++ b/guava/src/com/google/common/collect/ImmutableBiMap.java @@ -60,7 +60,7 @@ public abstract class ImmutableBiMap extends ImmutableMap implements * * @since 21.0 */ - public static + public static Collector> toImmutableBiMap( Function keyFunction, Function valueFunction) { diff --git a/guava/src/com/google/common/collect/ImmutableList.java b/guava/src/com/google/common/collect/ImmutableList.java index d297cde7f5c4..e2604c7ce5a1 100644 --- a/guava/src/com/google/common/collect/ImmutableList.java +++ b/guava/src/com/google/common/collect/ImmutableList.java @@ -73,7 +73,7 @@ public abstract class ImmutableList extends ImmutableCollection * * @since 21.0 */ - public static Collector> toImmutableList() { + public static Collector> toImmutableList() { return CollectCollectors.toImmutableList(); } diff --git a/guava/src/com/google/common/collect/ImmutableListMultimap.java b/guava/src/com/google/common/collect/ImmutableListMultimap.java index ed4bdbae47d7..4f7097ff7b1b 100644 --- a/guava/src/com/google/common/collect/ImmutableListMultimap.java +++ b/guava/src/com/google/common/collect/ImmutableListMultimap.java @@ -81,7 +81,7 @@ public class ImmutableListMultimap extends ImmutableMultimap * * @since 21.0 */ - public static + public static Collector> toImmutableListMultimap( Function keyFunction, Function valueFunction) { @@ -119,7 +119,7 @@ public class ImmutableListMultimap extends ImmutableMultimap * * @since 21.0 */ - public static + public static Collector> flatteningToImmutableListMultimap( Function keyFunction, Function> valuesFunction) { diff --git a/guava/src/com/google/common/collect/ImmutableMap.java b/guava/src/com/google/common/collect/ImmutableMap.java index c3dbb366dabf..d3b7cd627c50 100644 --- a/guava/src/com/google/common/collect/ImmutableMap.java +++ b/guava/src/com/google/common/collect/ImmutableMap.java @@ -85,7 +85,7 @@ public abstract class ImmutableMap implements Map, Serializable { * * @since 21.0 */ - public static + public static Collector> toImmutableMap( Function keyFunction, Function valueFunction) { @@ -105,7 +105,7 @@ public abstract class ImmutableMap implements Map, Serializable { * * @since 21.0 */ - public static + public static Collector> toImmutableMap( Function keyFunction, Function valueFunction, diff --git a/guava/src/com/google/common/collect/ImmutableMultiset.java b/guava/src/com/google/common/collect/ImmutableMultiset.java index ee0c842ab0b0..34951c5fb1c2 100644 --- a/guava/src/com/google/common/collect/ImmutableMultiset.java +++ b/guava/src/com/google/common/collect/ImmutableMultiset.java @@ -69,7 +69,7 @@ public abstract class ImmutableMultiset extends ImmutableMultisetGwtSerializa * * @since 21.0 */ - public static Collector> toImmutableMultiset() { + public static Collector> toImmutableMultiset() { return CollectCollectors.toImmutableMultiset(Function.identity(), e -> 1); } @@ -84,7 +84,7 @@ public abstract class ImmutableMultiset extends ImmutableMultisetGwtSerializa * * @since 22.0 */ - public static + public static Collector> toImmutableMultiset( Function elementFunction, ToIntFunction countFunction) { diff --git a/guava/src/com/google/common/collect/ImmutableRangeMap.java b/guava/src/com/google/common/collect/ImmutableRangeMap.java index aff84356ad27..2ab707714eb6 100644 --- a/guava/src/com/google/common/collect/ImmutableRangeMap.java +++ b/guava/src/com/google/common/collect/ImmutableRangeMap.java @@ -59,7 +59,7 @@ public class ImmutableRangeMap, V> implements RangeMap, V> + public static , V> Collector> toImmutableRangeMap( Function> keyFunction, Function valueFunction) { diff --git a/guava/src/com/google/common/collect/ImmutableRangeSet.java b/guava/src/com/google/common/collect/ImmutableRangeSet.java index 37139da86bb7..7ab80c2ec5e5 100644 --- a/guava/src/com/google/common/collect/ImmutableRangeSet.java +++ b/guava/src/com/google/common/collect/ImmutableRangeSet.java @@ -67,7 +67,7 @@ public final class ImmutableRangeSet extends AbstractRange * * @since 23.1 */ - public static > + public static > Collector, ?, ImmutableRangeSet> toImmutableRangeSet() { return CollectCollectors.toImmutableRangeSet(); } diff --git a/guava/src/com/google/common/collect/ImmutableSet.java b/guava/src/com/google/common/collect/ImmutableSet.java index 2763ed3b260e..c7ed896cb317 100644 --- a/guava/src/com/google/common/collect/ImmutableSet.java +++ b/guava/src/com/google/common/collect/ImmutableSet.java @@ -68,7 +68,7 @@ public abstract class ImmutableSet extends ImmutableCollection implements * * @since 21.0 */ - public static Collector> toImmutableSet() { + public static Collector> toImmutableSet() { return CollectCollectors.toImmutableSet(); } diff --git a/guava/src/com/google/common/collect/ImmutableSetMultimap.java b/guava/src/com/google/common/collect/ImmutableSetMultimap.java index d369d517bca4..494d7fb64672 100644 --- a/guava/src/com/google/common/collect/ImmutableSetMultimap.java +++ b/guava/src/com/google/common/collect/ImmutableSetMultimap.java @@ -89,7 +89,7 @@ public class ImmutableSetMultimap extends ImmutableMultimap * * @since 21.0 */ - public static + public static Collector> toImmutableSetMultimap( Function keyFunction, Function valueFunction) { @@ -136,7 +136,7 @@ public class ImmutableSetMultimap extends ImmutableMultimap * * @since 21.0 */ - public static + public static Collector> flatteningToImmutableSetMultimap( Function keyFunction, Function> valuesFunction) { diff --git a/guava/src/com/google/common/collect/ImmutableSortedMap.java b/guava/src/com/google/common/collect/ImmutableSortedMap.java index 0b4b706b8c59..bf9f70f8cd2e 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedMap.java +++ b/guava/src/com/google/common/collect/ImmutableSortedMap.java @@ -79,7 +79,7 @@ public final class ImmutableSortedMap extends ImmutableMap * * @since 21.0 */ - public static + public static Collector> toImmutableSortedMap( Comparator comparator, Function keyFunction, @@ -98,7 +98,7 @@ public final class ImmutableSortedMap extends ImmutableMap * * @since 21.0 */ - public static + public static Collector> toImmutableSortedMap( Comparator comparator, Function keyFunction, diff --git a/guava/src/com/google/common/collect/ImmutableSortedMultiset.java b/guava/src/com/google/common/collect/ImmutableSortedMultiset.java index a6ff97b30ffe..c68478b42897 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedMultiset.java +++ b/guava/src/com/google/common/collect/ImmutableSortedMultiset.java @@ -68,7 +68,7 @@ public abstract class ImmutableSortedMultiset extends ImmutableMultiset * * @since 21.0 */ - public static Collector> toImmutableSortedMultiset( + public static Collector> toImmutableSortedMultiset( Comparator comparator) { return toImmutableSortedMultiset(comparator, Function.identity(), e -> 1); } @@ -84,7 +84,7 @@ public abstract class ImmutableSortedMultiset extends ImmutableMultiset * * @since 22.0 */ - public static + public static Collector> toImmutableSortedMultiset( Comparator comparator, Function elementFunction, diff --git a/guava/src/com/google/common/collect/ImmutableSortedSet.java b/guava/src/com/google/common/collect/ImmutableSortedSet.java index 68bf0f2c2203..31ca5e202575 100644 --- a/guava/src/com/google/common/collect/ImmutableSortedSet.java +++ b/guava/src/com/google/common/collect/ImmutableSortedSet.java @@ -78,7 +78,7 @@ public abstract class ImmutableSortedSet extends ImmutableSet.CachingAsList Collector> toImmutableSortedSet( + public static Collector> toImmutableSortedSet( Comparator comparator) { return CollectCollectors.toImmutableSortedSet(comparator); } diff --git a/guava/src/com/google/common/collect/ImmutableTable.java b/guava/src/com/google/common/collect/ImmutableTable.java index 89176e404100..e1db67c93b29 100644 --- a/guava/src/com/google/common/collect/ImmutableTable.java +++ b/guava/src/com/google/common/collect/ImmutableTable.java @@ -64,7 +64,7 @@ public abstract class ImmutableTable extends AbstractTable * * @since 21.0 */ - public static + public static Collector> toImmutableTable( Function rowFunction, Function columnFunction, @@ -83,7 +83,7 @@ public abstract class ImmutableTable extends AbstractTable * * @since 21.0 */ - public static + public static Collector> toImmutableTable( Function rowFunction, Function columnFunction, diff --git a/guava/src/com/google/common/collect/Maps.java b/guava/src/com/google/common/collect/Maps.java index b281d8a8f4b5..2622db163a80 100644 --- a/guava/src/com/google/common/collect/Maps.java +++ b/guava/src/com/google/common/collect/Maps.java @@ -197,7 +197,7 @@ public static , V> ImmutableMap immutableEnumMap( * * @since 21.0 */ - public static , V> + public static , V> Collector> toImmutableEnumMap( java.util.function.Function keyFunction, java.util.function.Function valueFunction) { @@ -215,7 +215,7 @@ public static , V> ImmutableMap immutableEnumMap( * * @since 21.0 */ - public static , V> + public static , V> Collector> toImmutableEnumMap( java.util.function.Function keyFunction, java.util.function.Function valueFunction, diff --git a/guava/src/com/google/common/collect/MoreCollectors.java b/guava/src/com/google/common/collect/MoreCollectors.java index 587216e0feac..3c57ea0a9388 100644 --- a/guava/src/com/google/common/collect/MoreCollectors.java +++ b/guava/src/com/google/common/collect/MoreCollectors.java @@ -59,7 +59,7 @@ public final class MoreCollectors { * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be * {@code null}) and returns {@code Optional.empty()} if it has none. */ - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") public static Collector> toOptional() { return (Collector) TO_OPTIONAL; } @@ -82,7 +82,7 @@ public final class MoreCollectors { * returned collector throws an {@code IllegalArgumentException} if the stream consists of two or * more elements, and a {@code NoSuchElementException} if the stream is empty. */ - @SuppressWarnings("unchecked") + @SuppressWarnings("unchecked") public static Collector onlyElement() { return (Collector) ONLY_ELEMENT; } diff --git a/guava/src/com/google/common/collect/Multimaps.java b/guava/src/com/google/common/collect/Multimaps.java index 7f2d688d4aee..c0aaa2cba375 100644 --- a/guava/src/com/google/common/collect/Multimaps.java +++ b/guava/src/com/google/common/collect/Multimaps.java @@ -113,7 +113,7 @@ private Multimaps() {} * * @since 21.0 */ - public static < + public static < T extends @Nullable Object, K extends @Nullable Object, V extends @Nullable Object, @@ -158,7 +158,7 @@ private Multimaps() {} * * @since 21.0 */ - public static < + public static < T extends @Nullable Object, K extends @Nullable Object, V extends @Nullable Object, diff --git a/guava/src/com/google/common/collect/Multisets.java b/guava/src/com/google/common/collect/Multisets.java index 6eefa3c4fc31..1f73dc83a00d 100644 --- a/guava/src/com/google/common/collect/Multisets.java +++ b/guava/src/com/google/common/collect/Multisets.java @@ -81,7 +81,7 @@ private Multisets() {} * * @since 22.0 */ - public static > + public static > Collector toMultiset( Function elementFunction, ToIntFunction countFunction, diff --git a/guava/src/com/google/common/collect/Sets.java b/guava/src/com/google/common/collect/Sets.java index 40134e176ab2..d46bc06715b3 100644 --- a/guava/src/com/google/common/collect/Sets.java +++ b/guava/src/com/google/common/collect/Sets.java @@ -149,7 +149,7 @@ public static > ImmutableSet immutableEnumSet(Iterable e * * @since 21.0 */ - public static > Collector> toImmutableEnumSet() { + public static > Collector> toImmutableEnumSet() { return CollectCollectors.toImmutableEnumSet(); } diff --git a/guava/src/com/google/common/collect/Streams.java b/guava/src/com/google/common/collect/Streams.java index 6429252de5ce..5161f0a588d6 100644 --- a/guava/src/com/google/common/collect/Streams.java +++ b/guava/src/com/google/common/collect/Streams.java @@ -64,7 +64,7 @@ public final class Streams { * Returns a sequential {@link Stream} of the contents of {@code iterable}, delegating to {@link * Collection#stream} if possible. */ - public static Stream stream(Iterable iterable) { + public static Stream stream(Iterable iterable) { return (iterable instanceof Collection) ? ((Collection) iterable).stream() : StreamSupport.stream(iterable.spliterator(), false); @@ -85,7 +85,7 @@ public final class Streams { * Returns a sequential {@link Stream} of the remaining contents of {@code iterator}. Do not use * {@code iterator} directly after passing it to this method. */ - public static Stream stream(Iterator iterator) { + public static Stream stream(Iterator iterator) { return StreamSupport.stream(Spliterators.spliteratorUnknownSize(iterator, 0), false); } @@ -93,7 +93,7 @@ public final class Streams { * If a value is present in {@code optional}, returns a stream containing only that element, * otherwise returns an empty stream. */ - public static Stream stream(com.google.common.base.Optional optional) { + public static Stream stream(com.google.common.base.Optional optional) { return optional.isPresent() ? Stream.of(optional.get()) : Stream.empty(); } @@ -104,7 +104,7 @@ public static Stream stream(com.google.common.base.Optional optional) *

Java 9 users: use {@code optional.stream()} instead. */ @Beta - @InlineMe(replacement = "optional.stream()") + @InlineMe(replacement = "optional.stream()") @InlineMeValidationDisabled("Java 9+ API only") public static Stream stream(java.util.Optional optional) { return optional.isPresent() ? Stream.of(optional.get()) : Stream.empty(); @@ -117,7 +117,7 @@ public static Stream stream(java.util.Optional optional) { *

Java 9 users: use {@code optional.stream()} instead. */ @Beta - @InlineMe(replacement = "optional.stream()") + @InlineMe(replacement = "optional.stream()") @InlineMeValidationDisabled("Java 9+ API only") public static IntStream stream(OptionalInt optional) { return optional.isPresent() ? IntStream.of(optional.getAsInt()) : IntStream.empty(); @@ -130,7 +130,7 @@ public static IntStream stream(OptionalInt optional) { *

Java 9 users: use {@code optional.stream()} instead. */ @Beta - @InlineMe(replacement = "optional.stream()") + @InlineMe(replacement = "optional.stream()") @InlineMeValidationDisabled("Java 9+ API only") public static LongStream stream(OptionalLong optional) { return optional.isPresent() ? LongStream.of(optional.getAsLong()) : LongStream.empty(); @@ -143,7 +143,7 @@ public static LongStream stream(OptionalLong optional) { *

Java 9 users: use {@code optional.stream()} instead. */ @Beta - @InlineMe(replacement = "optional.stream()") + @InlineMe(replacement = "optional.stream()") @InlineMeValidationDisabled("Java 9+ API only") public static DoubleStream stream(OptionalDouble optional) { return optional.isPresent() ? DoubleStream.of(optional.getAsDouble()) : DoubleStream.empty(); diff --git a/guava/src/com/google/common/collect/Tables.java b/guava/src/com/google/common/collect/Tables.java index 755e5736941b..a55d691014f3 100644 --- a/guava/src/com/google/common/collect/Tables.java +++ b/guava/src/com/google/common/collect/Tables.java @@ -67,7 +67,7 @@ private Tables() {} * * @since 21.0 */ - public static < + public static < T extends @Nullable Object, R extends @Nullable Object, C extends @Nullable Object, @@ -96,7 +96,7 @@ private Tables() {} * * @since 21.0 */ - public static < + public static < T extends @Nullable Object, R extends @Nullable Object, C extends @Nullable Object, diff --git a/guava/src/com/google/common/primitives/Chars.java b/guava/src/com/google/common/primitives/Chars.java index a85526f85b85..7b5f94d80f86 100644 --- a/guava/src/com/google/common/primitives/Chars.java +++ b/guava/src/com/google/common/primitives/Chars.java @@ -214,7 +214,7 @@ private static int lastIndexOf(char[] array, char target, int start, int end) { * the array * @throws IllegalArgumentException if {@code array} is empty */ - public static char min(char... array) { + public static char min(char... array) { checkArgument(array.length > 0); char min = array[0]; for (int i = 1; i < array.length; i++) { @@ -233,7 +233,7 @@ public static char min(char... array) { * in the array * @throws IllegalArgumentException if {@code array} is empty */ - public static char max(char... array) { + public static char max(char... array) { checkArgument(array.length > 0); char max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/Doubles.java b/guava/src/com/google/common/primitives/Doubles.java index 82511a9c1d92..97a6d300ebf9 100644 --- a/guava/src/com/google/common/primitives/Doubles.java +++ b/guava/src/com/google/common/primitives/Doubles.java @@ -212,7 +212,7 @@ private static int lastIndexOf(double[] array, double target, int start, int end */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static double min(double... array) { + public static double min(double... array) { checkArgument(array.length > 0); double min = array[0]; for (int i = 1; i < array.length; i++) { @@ -232,7 +232,7 @@ public static double min(double... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static double max(double... array) { + public static double max(double... array) { checkArgument(array.length > 0); double max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/Floats.java b/guava/src/com/google/common/primitives/Floats.java index 30cee7fad74b..3e6c86490d10 100644 --- a/guava/src/com/google/common/primitives/Floats.java +++ b/guava/src/com/google/common/primitives/Floats.java @@ -207,7 +207,7 @@ private static int lastIndexOf(float[] array, float target, int start, int end) */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static float min(float... array) { + public static float min(float... array) { checkArgument(array.length > 0); float min = array[0]; for (int i = 1; i < array.length; i++) { @@ -227,7 +227,7 @@ public static float min(float... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static float max(float... array) { + public static float max(float... array) { checkArgument(array.length > 0); float max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/Ints.java b/guava/src/com/google/common/primitives/Ints.java index d597efa9dfac..8c77f3e068c2 100644 --- a/guava/src/com/google/common/primitives/Ints.java +++ b/guava/src/com/google/common/primitives/Ints.java @@ -223,7 +223,7 @@ private static int lastIndexOf(int[] array, int target, int start, int end) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static int min(int... array) { + public static int min(int... array) { checkArgument(array.length > 0); int min = array[0]; for (int i = 1; i < array.length; i++) { @@ -244,7 +244,7 @@ public static int min(int... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static int max(int... array) { + public static int max(int... array) { checkArgument(array.length > 0); int max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/Longs.java b/guava/src/com/google/common/primitives/Longs.java index 1c1ae1af57fd..54b460334647 100644 --- a/guava/src/com/google/common/primitives/Longs.java +++ b/guava/src/com/google/common/primitives/Longs.java @@ -192,7 +192,7 @@ private static int lastIndexOf(long[] array, long target, int start, int end) { * the array * @throws IllegalArgumentException if {@code array} is empty */ - public static long min(long... array) { + public static long min(long... array) { checkArgument(array.length > 0); long min = array[0]; for (int i = 1; i < array.length; i++) { @@ -211,7 +211,7 @@ public static long min(long... array) { * in the array * @throws IllegalArgumentException if {@code array} is empty */ - public static long max(long... array) { + public static long max(long... array) { checkArgument(array.length > 0); long max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/Shorts.java b/guava/src/com/google/common/primitives/Shorts.java index 3a1f9167b8c2..6e97371141d4 100644 --- a/guava/src/com/google/common/primitives/Shorts.java +++ b/guava/src/com/google/common/primitives/Shorts.java @@ -220,7 +220,7 @@ private static int lastIndexOf(short[] array, short target, int start, int end) */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static short min(short... array) { + public static short min(short... array) { checkArgument(array.length > 0); short min = array[0]; for (int i = 1; i < array.length; i++) { @@ -241,7 +241,7 @@ public static short min(short... array) { */ @GwtIncompatible( "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class.") - public static short max(short... array) { + public static short max(short... array) { checkArgument(array.length > 0); short max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/SignedBytes.java b/guava/src/com/google/common/primitives/SignedBytes.java index 5fb4de8b0d13..5fabaab6bd93 100644 --- a/guava/src/com/google/common/primitives/SignedBytes.java +++ b/guava/src/com/google/common/primitives/SignedBytes.java @@ -103,7 +103,7 @@ public static int compare(byte a, byte b) { * the array * @throws IllegalArgumentException if {@code array} is empty */ - public static byte min(byte... array) { + public static byte min(byte... array) { checkArgument(array.length > 0); byte min = array[0]; for (int i = 1; i < array.length; i++) { @@ -122,7 +122,7 @@ public static byte min(byte... array) { * in the array * @throws IllegalArgumentException if {@code array} is empty */ - public static byte max(byte... array) { + public static byte max(byte... array) { checkArgument(array.length > 0); byte max = array[0]; for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/UnsignedBytes.java b/guava/src/com/google/common/primitives/UnsignedBytes.java index 49d9a9135d7d..75e0266047a0 100644 --- a/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -135,7 +135,7 @@ public static int compare(byte a, byte b) { * the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static byte min(byte... array) { + public static byte min(byte... array) { checkArgument(array.length > 0); int min = toInt(array[0]); for (int i = 1; i < array.length; i++) { @@ -155,7 +155,7 @@ public static byte min(byte... array) { * in the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static byte max(byte... array) { + public static byte max(byte... array) { checkArgument(array.length > 0); int max = toInt(array[0]); for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/UnsignedInts.java b/guava/src/com/google/common/primitives/UnsignedInts.java index e2f60af51ea3..81771dc4c8c2 100644 --- a/guava/src/com/google/common/primitives/UnsignedInts.java +++ b/guava/src/com/google/common/primitives/UnsignedInts.java @@ -121,7 +121,7 @@ public static int saturatedCast(long value) { * the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static int min(int... array) { + public static int min(int... array) { checkArgument(array.length > 0); int min = flip(array[0]); for (int i = 1; i < array.length; i++) { @@ -141,7 +141,7 @@ public static int min(int... array) { * in the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static int max(int... array) { + public static int max(int... array) { checkArgument(array.length > 0); int max = flip(array[0]); for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/primitives/UnsignedLongs.java b/guava/src/com/google/common/primitives/UnsignedLongs.java index d44e66630d52..bb806c0773ed 100644 --- a/guava/src/com/google/common/primitives/UnsignedLongs.java +++ b/guava/src/com/google/common/primitives/UnsignedLongs.java @@ -86,7 +86,7 @@ public static int compare(long a, long b) { * the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static long min(long... array) { + public static long min(long... array) { checkArgument(array.length > 0); long min = flip(array[0]); for (int i = 1; i < array.length; i++) { @@ -106,7 +106,7 @@ public static long min(long... array) { * in the array according to {@link #compare} * @throws IllegalArgumentException if {@code array} is empty */ - public static long max(long... array) { + public static long max(long... array) { checkArgument(array.length > 0); long max = flip(array[0]); for (int i = 1; i < array.length; i++) { diff --git a/guava/src/com/google/common/util/concurrent/ClosingFuture.java b/guava/src/com/google/common/util/concurrent/ClosingFuture.java index e43b12f6d103..8280f46189be 100644 --- a/guava/src/com/google/common/util/concurrent/ClosingFuture.java +++ b/guava/src/com/google/common/util/concurrent/ClosingFuture.java @@ -826,7 +826,7 @@ public String toString() { * @param function transforms the value of a {@code ClosingFuture} step to a {@link * ListenableFuture} with the value of a derived step */ - public static + public static AsyncClosingFunction withoutCloser(final AsyncFunction function) { checkNotNull(function); return new AsyncClosingFunction() { diff --git a/guava/src/com/google/common/util/concurrent/Futures.java b/guava/src/com/google/common/util/concurrent/Futures.java index 094b42022c63..7a967715c833 100644 --- a/guava/src/com/google/common/util/concurrent/Futures.java +++ b/guava/src/com/google/common/util/concurrent/Futures.java @@ -131,7 +131,7 @@ private Futures() {} * getters just return the value. This {@code Future} can't be canceled or timed out and its * {@code isDone()} method always returns {@code true}. */ - public static ListenableFuture immediateFuture( + public static ListenableFuture immediateFuture( @ParametricNullness V value) { if (value == null) { // This cast is safe because null is assignable to V for all V (i.e. it is bivariant) @@ -160,7 +160,7 @@ private Futures() {} * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code * Throwable} wrapped in an {@code ExecutionException}. */ - public static ListenableFuture immediateFailedFuture( + public static ListenableFuture immediateFailedFuture( Throwable throwable) { checkNotNull(throwable); return new ImmediateFailedFuture<>(throwable); @@ -173,7 +173,7 @@ private Futures() {} * @since 14.0 */ @SuppressWarnings("unchecked") // ImmediateCancelledFuture can work with any type - public static ListenableFuture immediateCancelledFuture() { + public static ListenableFuture immediateCancelledFuture() { ListenableFuture instance = ImmediateCancelledFuture.INSTANCE; if (instance != null) { return (ListenableFuture) instance; diff --git a/guava/src/com/google/common/util/concurrent/MoreExecutors.java b/guava/src/com/google/common/util/concurrent/MoreExecutors.java index f5051ff18215..903dfa07742f 100644 --- a/guava/src/com/google/common/util/concurrent/MoreExecutors.java +++ b/guava/src/com/google/common/util/concurrent/MoreExecutors.java @@ -324,7 +324,7 @@ private static void useDaemonThreadFactory(ThreadPoolExecutor executor) { * * @since 18.0 (present as MoreExecutors.sameThreadExecutor() since 10.0) */ - @GwtIncompatible // TODO + @GwtIncompatible // TODO public static ListeningExecutorService newDirectExecutorService() { return new DirectExecutorService(); } @@ -390,7 +390,7 @@ public static ListeningExecutorService newDirectExecutorService() { * * @since 18.0 */ - public static Executor directExecutor() { + public static Executor directExecutor() { return DirectExecutor.INSTANCE; } @@ -438,7 +438,7 @@ public static Executor directExecutor() { * * @since 23.3 (since 23.1 as {@code sequentialExecutor}) */ - @J2ktIncompatible + @J2ktIncompatible @GwtIncompatible public static Executor newSequentialExecutor(Executor delegate) { return new SequentialExecutor(delegate);