ApacheCommonsFileUtils Refaster recipes
MSALRefaster template recipes for org.openrewrite.apache.commons.io.ApacheCommonsFileUtils.
org. openrewrite. apache. commons. io. ApacheCommonsFileUtilsRecipesmod run . --recipe= org. openrewrite. apache. commons. io. ApacheCommonsFileUtilsRecipesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Replace
FileUtils.getFile(String...)with JDK provided API - Replace
FileUtils.writeStringToFile(File, String)with JDK provided API - Replace
FileUtils.readFileToString(File)withFileUtils.readFileToString(File, StandardCharsets.UTF_8) - Replace
FileUtils.readLines(File)withFileUtils.readLines(File, StandardCharsets.UTF_8) - Replace
FileUtils.write(File, CharSequence)withFileUtils.write(File, CharSequence, StandardCharsets.UTF_8, false) - Replace
FileUtils.write(File, CharSequence, boolean)withFileUtils.write(File, CharSequence, StandardCharsets.UTF_8, boolean) - Replace
FileUtils.writeStringToFile(File, String, boolean)withFileUtils.writeStringToFile(File, String, StandardCharsets.UTF_8, boolean)