summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2013-05-16 14:58:07 (EDT)
committerPascal Rapicault2013-05-16 14:58:07 (EDT)
commitdd84b0338b3479f5ee41b18823f10d8ddeb4f2e4 (patch)
tree709b4ba00d726b44d921c0c6e27357cf9e2819ee
parente54bcf3357346b2223572bb4f352d49935674625 (diff)
downloadrt.equinox.p2-dd84b0338b3479f5ee41b18823f10d8ddeb4f2e4.zip
rt.equinox.p2-dd84b0338b3479f5ee41b18823f10d8ddeb4f2e4.tar.gz
rt.equinox.p2-dd84b0338b3479f5ee41b18823f10d8ddeb4f2e4.tar.bz2
Revert "Bug 408018 - [repository] Repository that raises HttpConnectionException are not marked as invalid "
-rw-r--r--bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryStatus.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java2
2 files changed, 3 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryStatus.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryStatus.java
index 6bca783..cc68acb 100644
--- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryStatus.java
+++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryStatus.java
@@ -11,15 +11,15 @@
package org.eclipse.equinox.internal.p2.transport.ecf;
+import org.eclipse.equinox.internal.p2.repository.DownloadStatus;
+import org.eclipse.equinox.p2.core.ProvisionException;
+
import java.io.FileNotFoundException;
import java.net.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.equinox.internal.p2.repository.DownloadStatus;
-import org.eclipse.equinox.internal.p2.repository.Messages;
-import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.osgi.util.NLS;
/**
@@ -117,8 +117,6 @@ public class RepositoryStatus {
public static DownloadStatus forException(Throwable t, URI toDownload) {
if (t instanceof FileNotFoundException || (t instanceof IncomingFileTransferException && ((IncomingFileTransferException) t).getErrorCode() == 404))
return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_NOT_FOUND, NLS.bind(Messages.artifact_not_found, toDownload), t);
- if (t.getClass().getName().equals("org.apache.http.conn.HttpHostConnectException"))
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload), t);
if (t instanceof ConnectException)
return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.TransportErrorTranslator_UnableToConnectToRepository_0, toDownload), t);
if (t instanceof UnknownHostException)
diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
index eb87f30..9db5978 100644
--- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
+++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/RepositoryTransport.java
@@ -298,8 +298,6 @@ public class RepositoryTransport extends Transport {
}
if (t instanceof FileNotFoundException || (t instanceof IncomingFileTransferException && ((IncomingFileTransferException) t).getErrorCode() == 404))
return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_NOT_FOUND, NLS.bind(Messages.artifact_not_found, toDownload), t);
- if (t.getClass().getName().equals("org.apache.http.conn.HttpHostConnectException"))
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload), t);
if (t instanceof ConnectException)
return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.TransportErrorTranslator_UnableToConnectToRepository_0, toDownload), t);
if (t instanceof UnknownHostException)