Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2010-10-04 11:42:20 -0400
committerDJ Houghton2010-10-04 11:42:20 -0400
commit66d60f2ea0d94f246c00f8dd827d6c64bb7b0a88 (patch)
tree030503b99ac9b1a1933a2bd5dfe8d962824d846f /bundles/org.eclipse.equinox.p2.repository
parent611a5415c3b221e763e7fa0c08ef2005711a7738 (diff)
downloadrt.equinox.p2-66d60f2ea0d94f246c00f8dd827d6c64bb7b0a88.tar.gz
rt.equinox.p2-66d60f2ea0d94f246c00f8dd827d6c64bb7b0a88.tar.xz
rt.equinox.p2-66d60f2ea0d94f246c00f8dd827d6c64bb7b0a88.zip
Bug 323149 - P2 Nullpointer Exception at RepositoryTransport.download
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties3
3 files changed, 12 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
index daf6642ee..4cd929b65 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation 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
@@ -79,6 +79,9 @@ public class Messages extends NLS {
public static String UnableToRead_0_TooManyAttempts;
public static String UnableToRead_0_UserCanceled;
+
+ public static String RepositoryTransport_failedReadRepo;
+
static {
// initialize resource bundles
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
index 3ab7b7ade..f965d83fe 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006-2009, IBM Corporation and other.
+ * Copyright (c) 2006, 2010, IBM Corporation and other.
* The code, documentation and other materials contained herein have been
* licensed under the Eclipse Public License - v 1.0 by the copyright holder
* listed above, as the Initial Contributor under such license. The text of
@@ -72,6 +72,11 @@ public class RepositoryTransport extends Transport {
// check that job ended ok - throw exceptions otherwise
IStatus result = reader.getResult();
+ if (result == null) {
+ String msg = NLS.bind(Messages.RepositoryTransport_failedReadRepo, toDownload);
+ DownloadStatus ds = new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, null);
+ return statusOn(target, ds, reader);
+ }
if (result.getSeverity() == IStatus.CANCEL)
throw new UserCancelledException();
if (!result.isOK())
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
index 510885ba0..fdc13e015 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
+# Copyright (c) 2007, 2010 IBM Corporation 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
@@ -72,3 +72,4 @@ FileTransport_cancelCheck=File Transport Cancel Handler
connection_to_0_failed_on_1_retry_attempt_2=Connection to {0} failed on {1}. Retry attempt {2} started
UnableToRead_0_TooManyAttempts=Unable to read repository at: {0}. Too many failed login attempts.
UnableToRead_0_UserCanceled=Unable to read repository at: {0}. Login canceled by user.
+RepositoryTransport_failedReadRepo=Error while reading from repository: {0}.

Back to the top