diff --git a/android/guava/src/com/google/common/base/Predicates.java b/android/guava/src/com/google/common/base/Predicates.java index 30d2ac7dc8f5..868c0fe7a41c 100644 --- a/android/guava/src/com/google/common/base/Predicates.java +++ b/android/guava/src/com/google/common/base/Predicates.java @@ -234,9 +234,11 @@ public static Predicate> subtypeOf(Class clazz) { * * @throws IllegalArgumentException if the pattern is invalid * @since 3.0 + * @deprecated Use {@link java.util.regex.Pattern#asPredicate} */ @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. + @Deprecated public static Predicate containsPattern(String pattern) { return new ContainsPatternFromStringPredicate(pattern); } @@ -247,9 +249,11 @@ public static Predicate containsPattern(String pattern) { * {@code pattern.matcher(arg).find()} * * @since 3.0 + * @deprecated Use {@link java.util.regex.Pattern#asPredicate} */ @J2ktIncompatible @GwtIncompatible(value = "java.util.regex.Pattern") + @Deprecated public static Predicate contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); } diff --git a/guava/src/com/google/common/base/Predicates.java b/guava/src/com/google/common/base/Predicates.java index 30d2ac7dc8f5..868c0fe7a41c 100644 --- a/guava/src/com/google/common/base/Predicates.java +++ b/guava/src/com/google/common/base/Predicates.java @@ -234,9 +234,11 @@ public static Predicate> subtypeOf(Class clazz) { * * @throws IllegalArgumentException if the pattern is invalid * @since 3.0 + * @deprecated Use {@link java.util.regex.Pattern#asPredicate} */ @J2ktIncompatible @GwtIncompatible // Only used by other GWT-incompatible code. + @Deprecated public static Predicate containsPattern(String pattern) { return new ContainsPatternFromStringPredicate(pattern); } @@ -247,9 +249,11 @@ public static Predicate containsPattern(String pattern) { * {@code pattern.matcher(arg).find()} * * @since 3.0 + * @deprecated Use {@link java.util.regex.Pattern#asPredicate} */ @J2ktIncompatible @GwtIncompatible(value = "java.util.regex.Pattern") + @Deprecated public static Predicate contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); }