src/share/classes/java/awt/image/renderable/ParameterBlock.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

@@ -379,11 +379,11 @@
      *            <code>parameters</code> <code>Vector</code>
      * @return a new <code>ParameterBlock</code> containing
      *         the specified parameter.
      */
     public ParameterBlock add(long l) {
-        return add(new Long(l));
+        return add(l);
     }
 
     /**
      * Adds a Float to the list of parameters.
      * @param f the float to add to the

@@ -503,11 +503,11 @@
      *        replaced with the specified parameter
      * @return a new <code>ParameterBlock</code> containing
      *        the specified parameter.
      */
     public ParameterBlock set(long l, int index) {
-        return set(new Long(l), index);
+        return set(l, index);
     }
 
     /**
      * Replaces an Object in the list of parameters with a Float.
      * If the index lies beyond the current source list,