Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java8
1 files changed, 5 insertions, 3 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 6b740e448..bc5a2105f 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
@@ -98,9 +98,11 @@ public class ProgressStatistics {
long amount = 0L;
SortedMap<Long, Long> relevantData = m_recentSpeedMap.headMap(new Long(m_recentSpeedMapKey));
- for (Long rl : relevantData.values()) {
- dur += SPEED_RESOLUTION;
- amount += rl.longValue();
+ if (!relevantData.isEmpty()) {
+ for (Long rl : relevantData.values()) {
+ dur += SPEED_RESOLUTION;
+ amount += rl.longValue();
+ }
}
if (dur >= 1000)

Back to the top