src/share/classes/com/sun/jndi/ldap/NamingEventNotifier.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

@@ -219,11 +219,11 @@
     private void fireObjectAdded(Binding newBd, long changeID) {
         if (namingListeners == null || namingListeners.size() == 0)
             return;
 
         NamingEvent e = new NamingEvent(eventSrc, NamingEvent.OBJECT_ADDED,
-            newBd, null, new Long(changeID));
+            newBd, null, changeID);
         support.queueEvent(e, namingListeners);
     }
 
     /**
      * Fire an "object removed" event to registered NamingListeners.

@@ -231,11 +231,11 @@
     private void fireObjectRemoved(Binding oldBd, long changeID) {
         if (namingListeners == null || namingListeners.size() == 0)
             return;
 
         NamingEvent e = new NamingEvent(eventSrc, NamingEvent.OBJECT_REMOVED,
-            null, oldBd, new Long(changeID));
+            null, oldBd, changeID);
         support.queueEvent(e, namingListeners);
     }
 
     /**
      * Fires an "object changed" event to registered NamingListeners.

@@ -246,11 +246,11 @@
 
         // Name hasn't changed; construct old binding using name from new binding
         Binding oldBd = new Binding(newBd.getName(), null, newBd.isRelative());
 
         NamingEvent e = new NamingEvent(
-            eventSrc, NamingEvent.OBJECT_CHANGED, newBd, oldBd, new Long(changeID));
+            eventSrc, NamingEvent.OBJECT_CHANGED, newBd, oldBd, changeID);
         support.queueEvent(e, namingListeners);
     }
 
     /**
      * Fires an "object renamed" to registered NamingListeners.

@@ -271,11 +271,11 @@
         if (oldBd == null) {
             oldBd = new Binding(oldDN, null, false /* not relative name */);
         }
 
         NamingEvent e = new NamingEvent(
-            eventSrc, NamingEvent.OBJECT_RENAMED, newBd, oldBd, new Long(changeID));
+            eventSrc, NamingEvent.OBJECT_RENAMED, newBd, oldBd, changeID);
         support.queueEvent(e, namingListeners);
     }
 
     private void fireNamingException(NamingException e) {
         if (namingListeners == null || namingListeners.size() == 0)