src/share/classes/javax/management/modelmbean/RequiredModelMBean.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>

*** 542,552 **** RequiredModelMBean.class.getName(), mth,"currencyTimeLimit: " + expTime); } // convert seconds to milliseconds for time comparison ! currencyPeriod = ((new Long(expTime)).longValue()) * 1000; if (currencyPeriod < 0) { /* if currencyTimeLimit is -1 then value is never cached */ returnCachedValue = false; resetValue = true; if (tracing) { --- 542,552 ---- RequiredModelMBean.class.getName(), mth,"currencyTimeLimit: " + expTime); } // convert seconds to milliseconds for time comparison ! currencyPeriod = ((Long.valueOf(expTime)).longValue()) * 1000; if (currencyPeriod < 0) { /* if currencyTimeLimit is -1 then value is never cached */ returnCachedValue = false; resetValue = true; if (tracing) {
*** 578,588 **** } if (tStamp == null) tStamp = "0"; ! long lastTime = (new Long(tStamp)).longValue(); if (tracing) { MODELMBEAN_LOGGER.logp(Level.FINER, RequiredModelMBean.class.getName(),mth, "currencyPeriod:" + currencyPeriod + --- 578,588 ---- } if (tStamp == null) tStamp = "0"; ! long lastTime = Long.parseLong(tStamp); if (tracing) { MODELMBEAN_LOGGER.logp(Level.FINER, RequiredModelMBean.class.getName(),mth, "currencyPeriod:" + currencyPeriod +