Skip to content

Commit

Permalink
Renamed variable error -> failure
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdemaeyer committed Nov 7, 2024
1 parent e951a26 commit 5f801d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/apache/maven/plugins/clean/Cleaner.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ private boolean isSymbolicLink(Path path) throws IOException {
* @throws IOException If a file/directory could not be deleted and <code>failOnError</code> is <code>true</code>.
*/
private int delete(File file, boolean failOnError, boolean retryOnError) throws IOException {
IOException error = delete(file);
if (error != null) {
IOException failure = delete(file);
if (failure != null) {
boolean deleted = false;

if (retryOnError) {
Expand All @@ -298,10 +298,10 @@ private int delete(File file, boolean failOnError, boolean retryOnError) throws

if (!deleted) {
if (failOnError) {
throw new IOException("Failed to delete " + file, error);
throw new IOException("Failed to delete " + file, failure);
} else {
if (log.isWarnEnabled()) {
log.warn("Failed to delete " + file, error);
log.warn("Failed to delete " + file, failure);
}
return 1;
}
Expand Down

0 comments on commit 5f801d4

Please sign in to comment.