src/share/classes/sun/security/krb5/internal/KerberosTime.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
@@ -186,11 +186,11 @@
public Date toDate() {
return new Date(kerberosTime);
}
public int getMicroSeconds() {
- Long temp_long = new Long((kerberosTime % 1000L) * 1000L);
+ Long temp_long = (kerberosTime % 1000L) * 1000L;
return temp_long.intValue() + microSeconds;
}
/**
* Returns a new KerberosTime object with the original seconds
@@ -248,11 +248,11 @@
public boolean isZero() {
return kerberosTime == 0 && microSeconds == 0;
}
public int getSeconds() {
- Long temp_long = new Long(kerberosTime / 1000L);
+ Long temp_long = kerberosTime / 1000L;
return temp_long.intValue();
}
/**
* Parse (unmarshal) a kerberostime from a DER input stream. This form