From dd84b0338b3479f5ee41b18823f10d8ddeb4f2e4 Mon Sep 17 00:00:00 2001 From: Pascal Rapicault Date: Thu, 16 May 2013 14:58:07 -0400 Subject: Revert "Bug 408018 - [repository] Repository that raises HttpConnectionException are not marked as invalid " This reverts commit 054533b73d0db12e67279ea48520bbc4c692e462. --- .../equinox/internal/p2/transport/ecf/RepositoryStatus.java | 8 +++----- .../equinox/internal/p2/transport/ecf/RepositoryTransport.java | 2 -- 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 6bca78305..cc68acba0 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 eb87f3097..9db59789b 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) -- cgit v1.2.3