Skip to content

Commit

Permalink
Remove inheritance.
Browse files Browse the repository at this point in the history
Former-commit-id: 801cd2186ecf79a391b52fa05de17be3369320b3
  • Loading branch information
dkocher committed Aug 26, 2013
1 parent 74ca4ff commit 992b32f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/ch/cyberduck/core/s3/S3MultipartUploadService.java
Expand Up @@ -23,6 +23,7 @@
import ch.cyberduck.core.Preferences;
import ch.cyberduck.core.exception.BackgroundException;
import ch.cyberduck.core.exception.ConnectionCanceledException;
import ch.cyberduck.core.features.Upload;
import ch.cyberduck.core.http.ResponseOutputStream;
import ch.cyberduck.core.io.BandwidthThrottle;
import ch.cyberduck.core.io.StreamCopier;
Expand Down Expand Up @@ -53,7 +54,7 @@
/**
* @version $Id$
*/
public class S3MultipartUploadService extends S3SingleUploadService {
public class S3MultipartUploadService implements Upload {
private static final Logger log = Logger.getLogger(S3MultipartUploadService.class);

/**
Expand All @@ -79,7 +80,6 @@ public class S3MultipartUploadService extends S3SingleUploadService {
private Long partsize;

public S3MultipartUploadService(final S3Session session, final Long partsize) {
super(session);
this.session = session;
this.partsize = partsize;
}
Expand Down Expand Up @@ -118,7 +118,7 @@ public void upload(final Path file, final BandwidthThrottle throttle, final Stre
final S3TouchFeature touch = new S3TouchFeature(session);
// Placeholder
touch.touch(file);
final StorageObject object = this.createObjectDetails(file);
final StorageObject object = new S3SingleUploadService(session).createObjectDetails(file);
// Initiate multipart upload with metadata
Map<String, Object> metadata = object.getModifiableMetadata();
if(StringUtils.isNotBlank(Preferences.instance().getProperty("s3.storage.class"))) {
Expand Down Expand Up @@ -220,7 +220,7 @@ public MultipartPart call() throws BackgroundException {
ResponseOutputStream<StorageObject> out = null;
try {
in = file.getLocal().getInputStream();
out = write(file, new StorageObject(containerService.getKey(file)), length, requestParameters);
out = new S3SingleUploadService(session).write(file, new StorageObject(containerService.getKey(file)), length, requestParameters);
new StreamCopier(status).transfer(in, offset, new ThrottledOutputStream(out, throttle), listener, length);
}
catch(IOException e) {
Expand Down

0 comments on commit 992b32f

Please sign in to comment.