Assign an Action instead of a Closure
*/
package com.bmuschko.gradle.docker.tasks.container
+import org.gradle.api.Action
+
class DockerInspectContainer extends DockerExistingContainer {
DockerInspectContainer() {
@@ -32,7 +34,9 @@ class DockerInspectContainer extends DockerExistingContainer {
}
private void defaultResponseHandling() {
- Closure c = { container ->
+ Action<Object> action = new Action<Object>() {
+ @Override
+ void execute(Object container) {
logger.quiet "Image ID : $container.imageId"
logger.quiet "Name : $container.name"
logger.quiet "Links : $container.hostConfig.links"
@@ -51,7 +55,8 @@ class DockerInspectContainer extends DockerExistingContainer {
} : '[]'
logger.quiet "Devices : $devices"
}
+ }
- nextHandler = c
+ nextHandler = action
}
}
