src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.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

@@ -134,11 +134,11 @@
      * leading to a nested SNMP sub-group.
      *
      */
     public boolean isNestedArc(long arc) {
         if (subgroups == null) return false;
-        Object obj = subgroups.get(new Long(arc));
+        Object obj = subgroups.get(arc);
         // if the arc is registered in the hashtable,
         // it leads to a subgroup.
         return (obj != null);
     }
 

@@ -258,11 +258,11 @@
      *
      * @param arc An OID arc.
      *
      */
     void registerNestedArc(long arc) {
-        Long obj = new Long(arc);
+        Long obj = arc;
         if (subgroups == null) subgroups = new Hashtable<>();
         // registers the arc in the hashtable.
         subgroups.put(obj,obj);
     }