Skip to content

Commit bed18c9

Browse files
committed
ToString impl. fore decorators & tasks
1 parent 55bc2b8 commit bed18c9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/java/net/tascalate/concurrent/AbstractCompletableTask.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ boolean onSuccess(T result) {
137137
boolean onError(Throwable ex) {
138138
return callbackRegistry.failure(ex);
139139
}
140+
141+
@Override
142+
public String toString() {
143+
return String.format("%s@%d[%s]", getClass().getSimpleName(), System.identityHashCode(this), task);
144+
}
140145

141146
class StageTransition extends FutureTask<T>
142147
implements CompletableFuture.AsynchronousCompletionTask {

src/main/java/net/tascalate/concurrent/decorators/AbstractCompletionStageDecorator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,6 @@ public CompletableFuture<T> toCompletableFuture() {
294294

295295
@Override
296296
public String toString() {
297-
return String.format("%s@%d[%s]", getClass().getName(), System.identityHashCode(this), delegate);
297+
return String.format("%s@%d[%s]", getClass().getSimpleName(), System.identityHashCode(this), delegate);
298298
}
299299
}

0 commit comments

Comments
 (0)