diff --git a/src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java b/src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java index 1d2039ada9..7f4a45b367 100644 --- a/src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java +++ b/src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java @@ -194,7 +194,11 @@ boolean after(String s) { public static class IsAlphanumericSpace { @BeforeTemplate boolean before(String s) { - return StringUtils.isAlphanumericSpace("^[a-zA-Z0-9\\s]*$"); + return StringUtils.isAlphanumericSpace(s); + } + + boolean after(String s) { + return s.matches("^[a-zA-Z0-9\\s]*$"); } }