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

@@ -100,11 +100,11 @@
      * @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.name = Long.valueOf(name).toString();
         this.primaryGroup = primaryGroup;
     }
 
     /**
      * Return the user's group identification number (GID) for this

@@ -127,11 +127,11 @@
      *
      * @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 Long.valueOf(name);
     }
 
     /**
      * Return whether this group identification number (GID) represents
      * the primary group to which this user belongs.