src/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.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

*** 100,110 **** * @param primaryGroup true if the specified GID represents the * primary group to which this user belongs. * */ public UnixNumericGroupPrincipal(long name, boolean primaryGroup) { ! this.name = (new Long(name)).toString(); this.primaryGroup = primaryGroup; } /** * Return the user's group identification number (GID) for this --- 100,110 ---- * @param primaryGroup true if the specified GID represents the * primary group to which this user belongs. * */ public UnixNumericGroupPrincipal(long name, boolean primaryGroup) { ! this.name = Long.valueOf(name).toString(); this.primaryGroup = primaryGroup; } /** * Return the user's group identification number (GID) for this
*** 127,137 **** * * @return the user's group identification number (GID) for this * <code>UnixNumericGroupPrincipal</code> as a long. */ public long longValue() { ! return ((new Long(name)).longValue()); } /** * Return whether this group identification number (GID) represents * the primary group to which this user belongs. --- 127,137 ---- * * @return the user's group identification number (GID) for this * <code>UnixNumericGroupPrincipal</code> as a long. */ public long longValue() { ! return Long.valueOf(name); } /** * Return whether this group identification number (GID) represents * the primary group to which this user belongs.