Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2011-05-25 14:50:18 +0000
committerDJ Houghton2011-05-25 14:50:18 +0000
commit7aecdc99707d3a189a0551ada8253177768864c0 (patch)
treef637085fb04384381d18ba89d4e1bb753837850b
parent3116468b6486ff58497a49f8d69e233cf2005eda (diff)
downloadrt.equinox.p2-7aecdc99707d3a189a0551ada8253177768864c0.tar.gz
rt.equinox.p2-7aecdc99707d3a189a0551ada8253177768864c0.tar.xz
rt.equinox.p2-7aecdc99707d3a189a0551ada8253177768864c0.zip
Bug 347050 - NPE in ProgressStatistics for URLs without filenamev20110525
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
index 1a22aaec0..6169fb36d 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
@@ -126,7 +126,7 @@ public class ProgressStatistics {
public synchronized String report() {
String uriString = m_uri.toString();
- if (uriString.endsWith(m_fileName))
+ if (m_fileName != null && uriString.endsWith(m_fileName))
uriString = uriString.substring(0, uriString.lastIndexOf(m_fileName));
return m_total != -1 ? NLS.bind(Messages.fetching_0_from_1_2_of_3_at_4, new String[] {m_fileName, uriString, convert(m_current), convert(m_total), convert(getRecentSpeed())}) : NLS.bind(Messages.fetching_0_from_1_2_at_3, new String[] {m_fileName, uriString, convert(m_current), convert(getRecentSpeed())});
}

Back to the top