Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-02-27 19:20:01 -0500
committerslewis2009-02-27 19:20:01 -0500
commitf39f14c5fd8e9b60d3cf0ff05fd19f4692fa6c3e (patch)
treec687686599a307ed572894493ae5580f0698ffcd /providers/bundles/org.eclipse.ecf.provider.filetransfer
parentc9a0c487f51549f824191bc5015f6f94adc49227 (diff)
downloadorg.eclipse.ecf-f39f14c5fd8e9b60d3cf0ff05fd19f4692fa6c3e.tar.gz
org.eclipse.ecf-f39f14c5fd8e9b60d3cf0ff05fd19f4692fa6c3e.tar.xz
org.eclipse.ecf-f39f14c5fd8e9b60d3cf0ff05fd19f4692fa6c3e.zip
Contributions from attachment 127064 on bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=263613
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.filetransfer')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java7
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java18
2 files changed, 17 insertions, 8 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
index 5f2656070..f62e71e40 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2007 Composent, Inc. and others.
+ * Copyright (c) 2007, 2009 Composent, Inc., IBM and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,12 +7,14 @@
*
* Contributors:
* Composent, Inc. - initial API and implementation
+ * Henrich Kraemer - bug 263613, [transport] Update site contacting / downloading is not cancelable
*****************************************************************************/
package org.eclipse.ecf.provider.filetransfer.browse;
import java.net.URL;
import java.util.Arrays;
+import java.util.List;
import org.eclipse.core.net.proxy.IProxyData;
import org.eclipse.core.net.proxy.IProxyService;
import org.eclipse.core.runtime.*;
@@ -175,7 +177,8 @@ public abstract class AbstractFileSystemBrowser {
public String toString() {
StringBuffer buf = new StringBuffer("RemoteFileSystemBrowseEvent["); //$NON-NLS-1$
buf.append("fileID=").append(fileID).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
- buf.append("files=" + Arrays.asList(remoteFiles)).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+ List list = (remoteFiles != null) ? Arrays.asList(remoteFiles) : null;
+ buf.append("files=").append(list).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
return buf.toString();
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
index 423c5839d..3a1c49ef6 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
@@ -462,8 +462,9 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans
* implementation of this method.
*
* @throws IncomingFileTransferException
+ * @throws Exception
*/
- protected abstract void openStreams() throws IncomingFileTransferException;
+ protected abstract void openStreams() throws IncomingFileTransferException, Exception;
/*
* (non-Javadoc)
@@ -767,12 +768,17 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans
this.rangeSpecification = rangeSpec;
try {
- this.remoteFileURL = rFileID.getURL();
- } catch (final MalformedURLException e) {
- throw new IncomingFileTransferException(NLS.bind(Messages.AbstractRetrieveFileTransfer_MalformedURLException, rFileID), e);
+ try {
+ this.remoteFileURL = rFileID.getURL();
+ } catch (final MalformedURLException e) {
+ throw new IncomingFileTransferException(NLS.bind(Messages.AbstractRetrieveFileTransfer_MalformedURLException, rFileID), e);
+ }
+ setupProxies();
+ openStreams();
+ } catch (final Exception e) {
+ setDoneException(e);
+ fireTransferReceiveDoneEvent();
}
- setupProxies();
- openStreams();
}
/**

Back to the top