Avoid anonymous class warning for hudson.FilePath$2
@@ -2049,9 +2049,22 @@ public final class FilePath implements SerializableOnlyOverRemoting {
}
final Pipe p = Pipe.createRemoteToLocal();
- actAsync(new SecureFileCallable<Void>() {
+ actAsync(new OffsetPipeSecureFileCallable(p, offset));
+ return new java.util.zip.GZIPInputStream(p.getIn());
+ }
+
+ private class OffsetPipeSecureFileCallable extends SecureFileCallable<Void> {
private static final long serialVersionUID = 1L;
+ private Pipe p;
+ private long offset;
+
+ private OffsetPipeSecureFileCallable(Pipe p, long offset) {
+ this.p = p;
+ this.offset = offset;
+ }
+
+ @Override
public Void invoke(File f, VirtualChannel channel) throws IOException {
try (OutputStream os = p.getOut();
OutputStream out = new java.util.zip.GZIPOutputStream(os, 8192);
@@ -2065,9 +2078,6 @@ public final class FilePath implements SerializableOnlyOverRemoting {
return null;
}
}
- });
-
- return new java.util.zip.GZIPInputStream(p.getIn());
}
/**
