Skip to content

Commit

Permalink
refactor: Kill your Zombie code
Browse files Browse the repository at this point in the history
Use this link to re-run the recipe: https://app.moderne.io/builder/mybR2aHWC?organizationId=T3BlblJld3JpdGU%3D

Co-authored-by: Moderne <[email protected]>
  • Loading branch information
timtebeek and TeamModerne committed Oct 23, 2024
1 parent 6dd876d commit 67d9faf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ void after(String dir) throws Exception {
description = "Replace Plexus `FileUtils.fileExists(String fileName)` with JDK provided API.")
static class FileExistsString {
@BeforeTemplate
boolean before(String fileName) throws Exception {
boolean before(String fileName) {
return FileUtils.fileExists(fileName);
}

@AfterTemplate
boolean after(String fileName) throws Exception {
boolean after(String fileName) {
return new File(fileName).exists();
}
}
Expand All @@ -76,12 +76,12 @@ boolean after(String fileName) throws Exception {
description = "Replace Plexus `FileUtils.getFile(String fileName)` with JDK provided API.")
static class GetFile {
@BeforeTemplate
File before(String fileName) throws Exception {
File before(String fileName) {
return FileUtils.getFile(fileName);
}

@AfterTemplate
File after(String fileName) throws Exception {
File after(String fileName) {
return new File(fileName);
}
}
Expand Down

0 comments on commit 67d9faf

Please sign in to comment.