Skip to content

Commit

Permalink
Fix: supplement the UnsupportedException message.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyang733 committed Dec 19, 2024
1 parent c08ac6e commit 5cea585
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/apache/hadoop/fs/CosFileSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -723,15 +723,19 @@ public void setOperationCancellingStatusProvider(OperationCancellingStatusProvid
if (this.actualImplFS instanceof CosNFileSystem) {
((CosNFileSystem) this.actualImplFS).setOperationCancellingStatusProvider(operationCancellingStatusProvider);
} else {
throw new UnsupportedOperationException("Not supported currently");
throw new UnsupportedOperationException(
String.format("Not supported currently for the filesystem '%s'.",
this.actualImplFS.getClass().getName()));
}
}

public void removeOperationCancelingStatusProvider() {
if (this.actualImplFS instanceof CosNFileSystem) {
((CosNFileSystem) this.actualImplFS).removeOperationCancelingStatusProvider();
} else {
throw new UnsupportedOperationException("Not supported currently");
throw new UnsupportedOperationException(
String.format("Not supported currently for the filesystem '%s'.",
this.actualImplFS.getClass().getName()));
}
}
}

0 comments on commit 5cea585

Please sign in to comment.