Skip to content

Commit

Permalink
issue #3472 has been resolved by remove .toString() method
Browse files Browse the repository at this point in the history
Signed-off-by: AnkurRanpariya2005 <patelankurv2005@gmail.com>
  • Loading branch information
AnkurRanpariya2005 committed Oct 21, 2024
1 parent 78e8631 commit 87c1921
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 87c1921

Please sign in to comment.