src/share/classes/sun/management/HotspotThread.java

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: Otavio Santana <otaviojava@java.net>

@@ -58,11 +58,11 @@
         String[] names = new String[count];
         long[] times = new long[count];
         int numThreads = getInternalThreadTimes0(names, times);
         Map<String, Long> result = new HashMap<>(numThreads);
         for (int i = 0; i < numThreads; i++) {
-            result.put(names[i], new Long(times[i]));
+            result.put(names[i], times[i]);
         }
         return result;
     }
     public native int getInternalThreadTimes0(String[] names, long[] times);