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