diff --git a/rewrite-core/src/main/java/org/eclipse/jgit/util/FS.java b/rewrite-core/src/main/java/org/eclipse/jgit/util/FS.java index 16936d0838a..be301b51f46 100644 --- a/rewrite-core/src/main/java/org/eclipse/jgit/util/FS.java +++ b/rewrite-core/src/main/java/org/eclipse/jgit/util/FS.java @@ -1417,7 +1417,7 @@ private static class GobblerThread extends Thread { GobblerThread(Process p, String[] command, File dir) { this.p = p; this.desc = Arrays.toString(command); - this.dir = Objects.toString(dir); + this.dir = String.valueOf(dir); } @Override diff --git a/rewrite-java/src/main/java/org/openrewrite/java/recipes/FindRecipes.java b/rewrite-java/src/main/java/org/openrewrite/java/recipes/FindRecipes.java index abe0fe8cc68..e524be095d0 100644 --- a/rewrite-java/src/main/java/org/openrewrite/java/recipes/FindRecipes.java +++ b/rewrite-java/src/main/java/org/openrewrite/java/recipes/FindRecipes.java @@ -36,7 +36,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.Objects; import static java.util.Objects.requireNonNull; @@ -153,7 +152,7 @@ private ValueNode mapValue(@Nullable Object value) { } else if (value == null) { return JsonNodeFactory.instance.nullNode(); } - throw new IllegalArgumentException(Objects.toString(value)); + throw new IllegalArgumentException(String.valueOf(value)); } }); }