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

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

@@ -106,20 +106,20 @@
         }
 
         // CONTENTS OF THIS ARRAY MUST BE SYNCHRONIZED WITH
         // threadInfoItemNames!
         final Object[] threadInfoItemValues = {
-            new Long(threadInfo.getThreadId()),
+            threadInfo.getThreadId(),
             threadInfo.getThreadName(),
             threadInfo.getThreadState().name(),
-            new Long(threadInfo.getBlockedTime()),
-            new Long(threadInfo.getBlockedCount()),
-            new Long(threadInfo.getWaitedTime()),
-            new Long(threadInfo.getWaitedCount()),
+            threadInfo.getBlockedTime(),
+            threadInfo.getBlockedCount(),
+            threadInfo.getWaitedTime(),
+            threadInfo.getWaitedCount(),
             lockInfoData,
             threadInfo.getLockName(),
-            new Long(threadInfo.getLockOwnerId()),
+            threadInfo.getLockOwnerId(),
             threadInfo.getLockOwnerName(),
             stackTraceData,
                 threadInfo.isSuspended(),
                 threadInfo.isInNative(),
             lockedMonitorsData,