Skip to content

Commit

Permalink
Remove unused parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Nov 25, 2024
1 parent 4cf8bba commit 5247729
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void post(final Session<?> source, final Session<?> destination, final Ma

@Override
public void transfer(final Session<?> session, final Session<?> destination, final Path source, final Local n,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) throws BackgroundException {
log.debug("Transfer file {} with options {}", source, options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public void post(final Session<?> source, final Session<?> destination, final Ma

@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, final Local local, final TransferOptions options,
final TransferStatus overall, final TransferStatus segment, final ConnectionCallback prompt,
final TransferStatus segment, final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) throws BackgroundException {
log.debug("Transfer file {} with options {} and status {}", file, options, segment);
if(file.isSymbolicLink()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ public TransferAction action(final Session<?> source, final Session<?> destinati

@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, final Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment, final ConnectionCallback prompt,
final TransferOptions options, final TransferStatus segment, final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) throws BackgroundException {
log.debug("Transfer file {} with options {}", file, options);
switch(comparison.compare(file, local, progress)) {
case remote:
download.transfer(source, destination, file, local, options, overall, segment, prompt, progress, listener);
download.transfer(source, destination, file, local, options, segment, prompt, progress, listener);
break;
case local:
upload.transfer(source, destination, file, local, options, overall, segment, prompt, progress, listener);
upload.transfer(source, destination, file, local, options, segment, prompt, progress, listener);
break;
}
}
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/java/ch/cyberduck/core/transfer/Transfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,13 @@ public void post(final Session<?> source, final Session<?> destination, final Ma
* @param file Remote file path
* @param local Local file reference
* @param options Quarantine option
* @param overall Overall transfer status
* @param segment Segment transfer status
* @param prompt Prompt for alerts to user
* @param progress Progress messages listener
* @param listener Byte count listener
* @param listener Byte count listener
*/
public abstract void transfer(Session<?> source, Session<?> destination, Path file, Local local,
TransferOptions options, TransferStatus overall, TransferStatus segment,
TransferOptions options, TransferStatus segment,
ConnectionCallback prompt, ProgressListener progress, StreamListener listener) throws BackgroundException;

public void start() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public void post(final Session<?> source, final Session<?> destination, final Ma

@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, final Local local, final TransferOptions options,
final TransferStatus overall, final TransferStatus segment, final ConnectionCallback prompt,
final TransferStatus segment, final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) throws BackgroundException {
log.debug("Transfer file {} with options {} and status {}", file, options, segment);
if(local.isSymbolicLink()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ public void complete(final Path file, final Local local,
// Bounce Downloads folder dock icon by sending download finished notification
launcher.bounce(local);
if(options.quarantine || options.wherefrom) {
//todo
final DescriptiveUrlBag provider = session.getFeature(UrlProvider.class).toUrl(file).filter(DescriptiveUrl.Type.provider, DescriptiveUrl.Type.http);
for(DescriptiveUrl url : provider) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import ch.cyberduck.core.exception.TransferCanceledException;
import ch.cyberduck.core.exception.TransferStatusCanceledException;
import ch.cyberduck.core.io.StreamListener;
import ch.cyberduck.core.local.IconService;
import ch.cyberduck.core.local.IconServiceFactory;
import ch.cyberduck.core.notification.NotificationService;
import ch.cyberduck.core.preferences.PreferencesFactory;
import ch.cyberduck.core.threading.TransferBackgroundActionState;
Expand Down Expand Up @@ -333,6 +335,7 @@ public Future<TransferStatus> transfer(final TransferItem item, final TransferAc
if(table.containsKey(item)) {
// Overall transfer status
final TransferStatus status = table.get(item);
final IconService.Icon icon = IconServiceFactory.iconFor(item.local);
// Handle submit of one or more segments
final List<TransferStatus> segments = status.getSegments();
for(final TransferStatus segment : segments) {
Expand Down Expand Up @@ -385,7 +388,7 @@ private void transferSegment(final TransferStatus segment) throws BackgroundExce
transfer.transfer(s, d,
segment.getRename().remote != null ? segment.getRename().remote : item.remote,
segment.getRename().local != null ? segment.getRename().local : item.local,
options, status, segment, connect, progress, counter);
options, segment, connect, progress, counter);
}
catch(BackgroundException e) {
release(s, Connection.source, e);
Expand Down Expand Up @@ -500,6 +503,9 @@ public TransferStatus call() throws BackgroundException {
status.setFailure(new ConnectionCanceledException());
}
}
if(status.isComplete()) {
icon.remove();
}
return status;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public AttributedList<Path> list(final Path folder, final ListProgressListener l
final Transfer t = new UploadTransfer(new Host(new TestProtocol()), root, local) {
@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) {
assertTrue(options.resumeRequested);
Expand Down Expand Up @@ -245,7 +245,7 @@ public AttributedList<Path> list(final Path folder, final ListProgressListener l
final Transfer t = new UploadTransfer(new Host(new TestProtocol()), root, local) {
@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) {
//
Expand Down Expand Up @@ -414,7 +414,7 @@ public StatusOutputStream write(final Path file, final TransferStatus status, fi
final Transfer transfer = new UploadTransfer(host, test, local) {
@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt, final ProgressListener progress, final StreamListener listener) {
segment.setComplete();
set.set(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void testConcurrentSessions() throws Exception {

@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, final Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) {
assertNotNull(source);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public boolean exists() {
final Transfer t = new UploadTransfer(new Host(new TestProtocol()), root, local) {
@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) {
//
Expand Down Expand Up @@ -130,7 +130,7 @@ public boolean exists() {
final Transfer t = new UploadTransfer(new Host(new TestProtocol()), root, local) {
@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) {
if(file.equals(root)) {
Expand Down Expand Up @@ -200,7 +200,7 @@ public AttributedList<Local> list() {
final Transfer t = new DownloadTransfer(new Host(new TestProtocol()), root, local) {
@Override
public void transfer(final Session<?> source, final Session<?> destination, final Path file, Local local,
final TransferOptions options, final TransferStatus overall, final TransferStatus segment,
final TransferOptions options, final TransferStatus segment,
final ConnectionCallback prompt,
final ProgressListener progress, final StreamListener listener) {
if(file.equals(root)) {
Expand Down

0 comments on commit 5247729

Please sign in to comment.