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: otaviojava@java.net

@@ -94,11 +94,11 @@
      *
      * @param name the user identification number (UID) for this user
      *                  represented as a long.
      */
     public SolarisNumericUserPrincipal(long name) {
-        this.name = (new Long(name)).toString();
+        this.name = Long.valueOf(name).toString();
     }
 
     /**
      * Return the user identification number (UID) for this
      * <code>SolarisNumericUserPrincipal</code>.

@@ -120,11 +120,11 @@
      *
      * @return the user identification number (UID) for this
      *          <code>SolarisNumericUserPrincipal</code> as a long.
      */
     public long longValue() {
-        return ((new Long(name)).longValue());
+        return Long.valueOf(name);
     }
 
     /**
      * Return a string representation of this
      * <code>SolarisNumericUserPrincipal</code>.