src/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.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>
*** 94,104 ****
*
* @param name the user identification number (UID) for this user
* represented as a long.
*/
public SolarisNumericUserPrincipal(long name) {
! this.name = (new Long(name)).toString();
}
/**
* Return the user identification number (UID) for this
* <code>SolarisNumericUserPrincipal</code>.
--- 94,104 ----
*
* @param name the user identification number (UID) for this user
* represented as a long.
*/
public SolarisNumericUserPrincipal(long name) {
! this.name = Long.valueOf(name).toString();
}
/**
* Return the user identification number (UID) for this
* <code>SolarisNumericUserPrincipal</code>.
*** 120,130 ****
*
* @return the user identification number (UID) for this
* <code>SolarisNumericUserPrincipal</code> as a long.
*/
public long longValue() {
! return ((new Long(name)).longValue());
}
/**
* Return a string representation of this
* <code>SolarisNumericUserPrincipal</code>.
--- 120,130 ----
*
* @return the user identification number (UID) for this
* <code>SolarisNumericUserPrincipal</code> as a long.
*/
public long longValue() {
! return Long.valueOf(name);
}
/**
* Return a string representation of this
* <code>SolarisNumericUserPrincipal</code>.