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

*** 108,118 **** * @param primaryGroup true if the specified GID represents the * primary group to which this user belongs. * */ public SolarisNumericGroupPrincipal(long name, boolean primaryGroup) { ! this.name = (new Long(name)).toString(); this.primaryGroup = primaryGroup; } /** * Return the user's group identification number (GID) for this --- 108,118 ---- * @param primaryGroup true if the specified GID represents the * primary group to which this user belongs. * */ public SolarisNumericGroupPrincipal(long name, boolean primaryGroup) { ! this.name = Long.valueOf(name).toString(); this.primaryGroup = primaryGroup; } /** * Return the user's group identification number (GID) for this
*** 135,145 **** * * @return the user's group identification number (GID) for this * <code>SolarisNumericGroupPrincipal</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. --- 135,145 ---- * * @return the user's group identification number (GID) for this * <code>SolarisNumericGroupPrincipal</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.