Delegate toString to wrapped class (#11959)

Delegate toString to wrapped class (#11959)
6.19.x
Sergii Kabashniuk 2018-11-19 09:27:30 +02:00 committed by GitHub
parent eb1fdbf6b6
commit f742047a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View File

@ -42,7 +42,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>

View File

@ -43,6 +43,11 @@ class CopyThreadLocalCallable<T> implements Callable<T> {
}
}
@Override
public String toString() {
return "CopyThreadLocalCallable{ " + wrapped.toString() + " }";
}
public Callable<? extends T> getWrapped() {
return wrapped;
}

View File

@ -42,6 +42,11 @@ class CopyThreadLocalRunnable implements Runnable {
}
}
@Override
public String toString() {
return "CopyThreadLocalRunnable{ " + wrapped.toString() + " }";
}
public Runnable getWrapped() {
return wrapped;
}