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,144 **** * leading to a nested SNMP sub-group. * */ public boolean isNestedArc(long arc) { if (subgroups == null) return false; ! Object obj = subgroups.get(new Long(arc)); // if the arc is registered in the hashtable, // it leads to a subgroup. return (obj != null); } --- 134,144 ---- * leading to a nested SNMP sub-group. * */ public boolean isNestedArc(long arc) { if (subgroups == null) return false; ! Object obj = subgroups.get(arc); // if the arc is registered in the hashtable, // it leads to a subgroup. return (obj != null); }
*** 258,268 **** * * @param arc An OID arc. * */ void registerNestedArc(long arc) { ! Long obj = new Long(arc); if (subgroups == null) subgroups = new Hashtable<>(); // registers the arc in the hashtable. subgroups.put(obj,obj); } --- 258,268 ---- * * @param arc An OID arc. * */ void registerNestedArc(long arc) { ! Long obj = arc; if (subgroups == null) subgroups = new Hashtable<>(); // registers the arc in the hashtable. subgroups.put(obj,obj); }