Deprecate Regex.matcher() with ERROR and provide the replacement.
This commit is contained in:
@@ -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]. */
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user