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