Deprecate Regex.matcher() with ERROR and provide the replacement.

This commit is contained in:
Ilya Gorbunov
2015-11-18 05:43:44 +03:00
parent eb2a976f32
commit bf3a77b736
2 changed files with 2 additions and 2 deletions
@@ -116,7 +116,7 @@ public class Regex internal constructor(private val nativePattern: Pattern) {
/** The set of options that were used to create this regular expression. */
public val options: Set<RegexOption> = fromInt(nativePattern.flags())
@Deprecated("To get the Matcher from java.util.regex.Pattern use toPattern to convert string to Pattern, or migrate to Regex API")
@Deprecated("To get the Matcher from java.util.regex.Pattern use toPattern to convert string to Pattern, or migrate to Regex API", ReplaceWith("toPattern().matcher(input)"), DeprecationLevel.ERROR)
public fun matcher(input: CharSequence): Matcher = nativePattern.matcher(input)
/** Indicates whether the regular expression matches the entire [input]. */
@@ -313,7 +313,7 @@ public class AnnotationProcessingManager(
fun processLines(lines: Sequence<String>) {
for (line in lines) {
if (line.isBlank() || !JAVA_FQNAME_PATTERN.matcher(line).matches()) continue
if (line.isBlank() || !JAVA_FQNAME_PATTERN.matches(line)) continue
annotationProcessors.add(line)
}
}