diff options
author | Alexander Kurtakov | 2018-01-30 18:36:31 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-01-30 18:36:31 +0000 |
commit | 263e9c737fb38f45777ac83a924f151d97826394 (patch) | |
tree | b86698b7276f4387f40238ef800d4fac539f0438 /bundles/org.eclipse.equinox.p2.repository/src/org/eclipse | |
parent | 8d990a7a055c3b929818fb4cb3b8cc5525b75b52 (diff) | |
download | rt.equinox.p2-263e9c737fb38f45777ac83a924f151d97826394.tar.gz rt.equinox.p2-263e9c737fb38f45777ac83a924f151d97826394.tar.xz rt.equinox.p2-263e9c737fb38f45777ac83a924f151d97826394.zip |
Bug 530526 - Don't use deprecated Number children constructors
Deprecated in Java 9 but the replacment methods are here for long time.
Change-Id: I645d66492831a95d27f61bc443c8896d73440579
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository/src/org/eclipse')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java | 8 |
1 files changed, 4 insertions, 4 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 8db17a7b2..4c4be1c3a 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 @@ -111,7 +111,7 @@ public class ProgressStatistics { removeObsoleteRecentSpeedData(getDuration() / SPEED_RESOLUTION); long dur = 0L; long amount = 0L; - SortedMap<Long, Long> relevantData = m_recentSpeedMap.headMap(new Long(m_recentSpeedMapKey)); + SortedMap<Long, Long> relevantData = m_recentSpeedMap.headMap(Long.valueOf(m_recentSpeedMapKey)); if (!relevantData.isEmpty()) { for (Long rl : relevantData.values()) { @@ -176,13 +176,13 @@ public class ProgressStatistics { } synchronized private void registerRecentSpeed(long key, long inc) { - Long keyL = new Long(key); + Long keyL = Long.valueOf(key); Long currentValueL = m_recentSpeedMap.get(keyL); long currentValue = 0L; if (currentValueL != null) currentValue = currentValueL.longValue(); - m_recentSpeedMap.put(keyL, new Long(inc + currentValue)); + m_recentSpeedMap.put(keyL, Long.valueOf(inc + currentValue)); if (m_recentSpeedMapKey != key) { m_recentSpeedMapKey = key; @@ -192,6 +192,6 @@ public class ProgressStatistics { synchronized private void removeObsoleteRecentSpeedData(long lastKey) { long threshold = lastKey - SPEED_INTERVAL / SPEED_RESOLUTION; - m_recentSpeedMap.headMap(new Long(threshold)).clear(); + m_recentSpeedMap.headMap(Long.valueOf(threshold)).clear(); } } |