Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-08-25 16:22:30 -0400
committerslewis2009-08-25 16:22:30 -0400
commit0e2a8b82a252a61247c0adf3d95539cc48cf7c1d (patch)
tree5fe766a70f8d326f9150de6549158a249811a4ba /providers/bundles/org.eclipse.ecf.provider.filetransfer
parent4331b308d7545268cef6a5584b0f952e45130602 (diff)
downloadorg.eclipse.ecf-0e2a8b82a252a61247c0adf3d95539cc48cf7c1d.tar.gz
org.eclipse.ecf-0e2a8b82a252a61247c0adf3d95539cc48cf7c1d.tar.xz
org.eclipse.ecf-0e2a8b82a252a61247c0adf3d95539cc48cf7c1d.zip
Corrected file not found behavior to be same as httpclient.
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/retrieve/UrlConnectionRetrieveFileTransfer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
index dae16162f..d96ccd98b 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.ecf.provider.filetransfer.retrieve;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.Authenticator;
@@ -17,6 +18,7 @@ import java.net.HttpURLConnection;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.net.URLConnection;
+import javax.microedition.io.HttpConnection;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.ecf.core.security.Callback;
@@ -303,6 +305,8 @@ public class UrlConnectionRetrieveFileTransfer extends AbstractRetrieveFileTrans
} else {
fireReceiveStartEvent();
}
+ } catch (final FileNotFoundException e) {
+ throw new IncomingFileTransferException(NLS.bind("File not found: {0}", getRemoteFileURL().toString()), HttpConnection.HTTP_NOT_FOUND); //$NON-NLS-1$
} catch (final Exception e) {
IncomingFileTransferException except = (e instanceof IncomingFileTransferException) ? (IncomingFileTransferException) e : new IncomingFileTransferException(NLS.bind(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, getRemoteFileURL().toString()), e, code);
hardClose();

Back to the top