Skip to content

Commit 1970361

Browse files
Recipe best practices
Use this link to re-run the recipe: https://app.moderne.io/builder/yESIGzVB0?organizationId=QUxML01vZGVybmUgKyBPcGVuUmV3cml0ZQ%3D%3D Co-authored-by: Moderne <team@moderne.io>
1 parent f3227f7 commit 1970361

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/openrewrite/java/migrate/lang/ExtractExplicitConstructorInvocationArguments.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private String baseName(Expression arg, @Nullable String paramName) {
212212

213213
private boolean isValidBaseName(@Nullable String name) {
214214
// Reject synthetic parameter names (`arg0`, `arg1`, ...) from constructors compiled without `-parameters`
215-
return name != null && !name.isEmpty() && Character.isJavaIdentifierStart(name.charAt(0)) &&
215+
return StringUtils.isNotEmpty( name ) && Character.isJavaIdentifierStart(name.charAt(0)) &&
216216
!name.matches("arg\\d+");
217217
}
218218

0 commit comments

Comments
 (0)