directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r784839 - /directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
Date Mon, 15 Jun 2009 16:14:40 GMT
Author: kayyagari
Date: Mon Jun 15 16:14:40 2009
New Revision: 784839

URL: http://svn.apache.org/viewvc?rev=784839&view=rev
Log:
replace listenermap.get(key) calls with remove(key) to free the listenerMap from unused listeners


Modified:
    directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java

Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java?rev=784839&r1=784838&r2=784839&view=diff
==============================================================================
--- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
(original)
+++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
Mon Jun 15 16:14:40 2009
@@ -1395,7 +1395,7 @@
                 addRespCodec.addControl( response.getCurrentControl() );
                 addRespCodec.setMessageId( response.getMessageId() );
                 
-                AddListener addListener = ( AddListener ) listenerMap.get( addRespCodec.getMessageId()
);
+                AddListener addListener = ( AddListener ) listenerMap.remove( addRespCodec.getMessageId()
);
                 AddResponse addResp = convert( addRespCodec );
                 if( addListener != null )
                 {
@@ -1438,7 +1438,7 @@
                 delRespCodec.setMessageId( response.getMessageId() );
                 delRespCodec.addControl( response.getCurrentControl() );
                 DeleteResponse delResp = convert( delRespCodec );
-                DeleteListener delListener = ( DeleteListener ) listenerMap.get( delResp.getMessageId()
);
+                DeleteListener delListener = ( DeleteListener ) listenerMap.remove( delResp.getMessageId()
);
                 
                 if( delListener != null )
                 {
@@ -1482,7 +1482,7 @@
                 modRespCodec.addControl( response.getCurrentControl() );
                 
                 ModifyResponse modResp = convert( modRespCodec );
-                ModifyListener modListener = ( ModifyListener ) listenerMap.get( modResp.getMessageId()
);
+                ModifyListener modListener = ( ModifyListener ) listenerMap.remove( modResp.getMessageId()
);
                 
                 if( modListener != null )
                 {
@@ -1500,7 +1500,7 @@
                 modDnCodec.addControl( response.getCurrentControl() );
                 modDnCodec.setMessageId( response.getMessageId() );
                 ModifyDnResponse modDnResp = convert( modDnCodec );
-                ModifyDnListener modDnListener = ( ModifyDnListener ) listenerMap.get( modDnCodec.getMessageId()
);
+                ModifyDnListener modDnListener = ( ModifyDnListener ) listenerMap.remove(
modDnCodec.getMessageId() );
                 if( modDnListener != null )
                 {
                     modDnListener.modifyDnCompleted( this, modDnResp );



Mime
View raw message