Remove leak of method into public API
End users will never want to call it.
@@ -49,8 +49,7 @@ abstract class AbstractDockerRemoteApiTask extends DefaultTask {
@Optional
final Property<String> apiVersion = project.objects.property(String)
- @Internal
- ThreadContextClassLoader threadContextClassLoader
+ protected ThreadContextClassLoader threadContextClassLoader
private Action<? super Throwable> errorHandler
protected Action<? super Object> nextHandler
@@ -76,11 +75,6 @@ abstract class AbstractDockerRemoteApiTask extends DefaultTask {
}
}
- @CompileStatic(TypeCheckingMode.SKIP)
- void runInDockerClassPath(Closure closure) {
- threadContextClassLoader.withContext(createDockerClientConfig(), closure)
- }
-
/**
* Reacts to a potential error occurring during the operation.
*
@@ -111,6 +105,11 @@ abstract class AbstractDockerRemoteApiTask extends DefaultTask {
completeHandler = callback
}
+ @CompileStatic(TypeCheckingMode.SKIP)
+ private void runInDockerClassPath(Closure closure) {
+ threadContextClassLoader.withContext(createDockerClientConfig(), closure)
+ }
+
private DockerClientConfiguration createDockerClientConfig() {
DockerClientConfiguration dockerClientConfig = new DockerClientConfiguration()
dockerClientConfig.url = url.getOrNull()
