src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.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>

*** 229,239 **** } catch (UnsatisfiedLinkError e) { // XXX Revisit: catch TO BE EVENTUALLY REMOVED log.debug("getJvmThreadInstCpuTimeNs", "Operation not supported: " + e); } ! return new Long(l); } /** * Getter for the "JvmThreadInstBlockTimeMs" variable. */ --- 229,239 ---- } catch (UnsatisfiedLinkError e) { // XXX Revisit: catch TO BE EVENTUALLY REMOVED log.debug("getJvmThreadInstCpuTimeNs", "Operation not supported: " + e); } ! return l; } /** * Getter for the "JvmThreadInstBlockTimeMs" variable. */
*** 246,263 **** l = info.getBlockedTime(); //Monitoring is disabled if(l == -1) l = 0; } ! return new Long(l); } /** * Getter for the "JvmThreadInstBlockCount" variable. */ public Long getJvmThreadInstBlockCount() throws SnmpStatusException { ! return new Long(info.getBlockedCount()); } /** * Getter for the "JvmThreadInstWaitTimeMs" variable. */ --- 246,263 ---- l = info.getBlockedTime(); //Monitoring is disabled if(l == -1) l = 0; } ! return l; } /** * Getter for the "JvmThreadInstBlockCount" variable. */ public Long getJvmThreadInstBlockCount() throws SnmpStatusException { ! return info.getBlockedCount(); } /** * Getter for the "JvmThreadInstWaitTimeMs" variable. */
*** 270,287 **** l = info.getWaitedTime(); //Monitoring is disabled if(l == -1) l = 0; } ! return new Long(l); } /** * Getter for the "JvmThreadInstWaitCount" variable. */ public Long getJvmThreadInstWaitCount() throws SnmpStatusException { ! return new Long(info.getWaitedCount()); } /** * Getter for the "JvmThreadInstState" variable. */ --- 270,287 ---- l = info.getWaitedTime(); //Monitoring is disabled if(l == -1) l = 0; } ! return l; } /** * Getter for the "JvmThreadInstWaitCount" variable. */ public Long getJvmThreadInstWaitCount() throws SnmpStatusException { ! return info.getWaitedCount(); } /** * Getter for the "JvmThreadInstState" variable. */
*** 292,302 **** /** * Getter for the "JvmThreadInstId" variable. */ public Long getJvmThreadInstId() throws SnmpStatusException { ! return new Long(info.getThreadId()); } /** * Getter for the "JvmThreadInstIndex" variable. */ --- 292,302 ---- /** * Getter for the "JvmThreadInstId" variable. */ public Long getJvmThreadInstId() throws SnmpStatusException { ! return info.getThreadId(); } /** * Getter for the "JvmThreadInstIndex" variable. */