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


 242         final String[] args = getInputArguments(JvmContextFactory.
 243                                                 getUserData());
 244         return new Integer(args.length);
 245     }
 246 
 247     /**
 248      * Getter for the "JvmRTBootClassPathSupport" variable.
 249      */
 250     public EnumJvmRTBootClassPathSupport getJvmRTBootClassPathSupport()
 251         throws SnmpStatusException {
 252         if(getRuntimeMXBean().isBootClassPathSupported())
 253             return JvmRTBootClassPathSupportSupported;
 254         else
 255             return JvmRTBootClassPathSupportUnSupported;
 256     }
 257 
 258     /**
 259      * Getter for the "JvmRTUptimeMs" variable.
 260      */
 261     public Long getJvmRTUptimeMs() throws SnmpStatusException {
 262         return new Long(getRuntimeMXBean().getUptime());
 263     }
 264 
 265     /**
 266      * Getter for the "JvmRTStartTimeMs" variable.
 267      */
 268     public Long getJvmRTStartTimeMs() throws SnmpStatusException {
 269         return new Long(getRuntimeMXBean().getStartTime());
 270     }
 271 
 272     /**
 273      * Getter for the "JvmRTSpecVersion" variable.
 274      */
 275     public String getJvmRTSpecVersion() throws SnmpStatusException {
 276         return validDisplayStringTC(getRuntimeMXBean().getSpecVersion());
 277     }
 278 
 279     /**
 280      * Getter for the "JvmRTName" variable.
 281      */
 282     public String getJvmRTName() throws SnmpStatusException {
 283         return validDisplayStringTC(getRuntimeMXBean().getName());
 284     }
 285 
 286 }


 242         final String[] args = getInputArguments(JvmContextFactory.
 243                                                 getUserData());
 244         return new Integer(args.length);
 245     }
 246 
 247     /**
 248      * Getter for the "JvmRTBootClassPathSupport" variable.
 249      */
 250     public EnumJvmRTBootClassPathSupport getJvmRTBootClassPathSupport()
 251         throws SnmpStatusException {
 252         if(getRuntimeMXBean().isBootClassPathSupported())
 253             return JvmRTBootClassPathSupportSupported;
 254         else
 255             return JvmRTBootClassPathSupportUnSupported;
 256     }
 257 
 258     /**
 259      * Getter for the "JvmRTUptimeMs" variable.
 260      */
 261     public Long getJvmRTUptimeMs() throws SnmpStatusException {
 262         return getRuntimeMXBean().getUptime();
 263     }
 264 
 265     /**
 266      * Getter for the "JvmRTStartTimeMs" variable.
 267      */
 268     public Long getJvmRTStartTimeMs() throws SnmpStatusException {
 269         return getRuntimeMXBean().getStartTime();
 270     }
 271 
 272     /**
 273      * Getter for the "JvmRTSpecVersion" variable.
 274      */
 275     public String getJvmRTSpecVersion() throws SnmpStatusException {
 276         return validDisplayStringTC(getRuntimeMXBean().getSpecVersion());
 277     }
 278 
 279     /**
 280      * Getter for the "JvmRTName" variable.
 281      */
 282     public String getJvmRTName() throws SnmpStatusException {
 283         return validDisplayStringTC(getRuntimeMXBean().getName());
 284     }
 285 
 286 }