Skip to content

Commit

Permalink
fix: removed unnecessary .toString() call from FileUtil
Browse files Browse the repository at this point in the history
Signed-off-by: AnkurRanpariya2005 <patelankurv2005@gmail.com>
  • Loading branch information
AnkurRanpariya2005 authored Oct 22, 2024
1 parent d325967 commit a27a6c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private static String getOutputName(URL url) {
if (slashIndex >= 0) {
return path.substring(slashIndex + 1);
} else {
throw new IllegalArgumentException(String.format("URL %s should contain a name file to be downloaded.", url.toString()));
throw new IllegalArgumentException(String.format("URL %s should contain a name file to be downloaded.", url));
}

}
Expand Down Expand Up @@ -189,7 +189,7 @@ public static String getRelativeFilePath( final String oldFilePath, final String
return null;
}
final StringBuilder relativeFilePath = new StringBuilder();
relativeFilePath.append(oldPath.relativize(newPath).toString());
relativeFilePath.append(oldPath.relativize(newPath));
if (newFilePath.endsWith(File.separator)) {
relativeFilePath.append(File.separator);
}
Expand Down

0 comments on commit a27a6c1

Please sign in to comment.