directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1067043 - /directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
Date Fri, 04 Feb 2011 00:14:54 GMT
Author: akarasulu
Date: Fri Feb  4 00:14:53 2011
New Revision: 1067043

URL: http://svn.apache.org/viewvc?rev=1067043&view=rev
Log:
protecting registration maps from Iterator based alteration

Modified:
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java?rev=1067043&r1=1067042&r2=1067043&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
Fri Feb  4 00:14:53 2011
@@ -21,6 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import java.nio.ByteBuffer;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -140,7 +141,7 @@ public class DefaultLdapCodecService imp
      */
     public Iterator<String> registeredControls()
     {
-        return controlFactories.keySet().iterator();
+        return Collections.unmodifiableSet( controlFactories.keySet() ).iterator();
     }
     
 
@@ -149,7 +150,7 @@ public class DefaultLdapCodecService imp
      */
     public Iterator<String> registeredExtendedRequests()
     {
-        return extReqFactories.keySet().iterator();
+        return Collections.unmodifiableSet( extReqFactories.keySet() ).iterator();
     }
 
     
@@ -158,7 +159,7 @@ public class DefaultLdapCodecService imp
      */
     public Iterator<String> registeredExtendedResponses()
     {
-        return extResFactories.keySet().iterator();
+        return Collections.unmodifiableSet( extResFactories.keySet() ).iterator();
     }
 
     
@@ -180,6 +181,9 @@ public class DefaultLdapCodecService imp
     }
 
     
+    /**
+     * {@inheritDoc}
+     */
     @SuppressWarnings("unchecked")
     public ICodecControl<? extends Control> newControl( String oid )
     {
@@ -203,6 +207,9 @@ public class DefaultLdapCodecService imp
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public ICodecControl<? extends Control> newControl( Control control )
     {
         try
@@ -225,6 +232,9 @@ public class DefaultLdapCodecService imp
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public javax.naming.ldap.Control toJndiControl( Control control ) throws EncoderException
     {
         ICodecControl<? extends Control> decorator = newControl( control );
@@ -237,6 +247,9 @@ public class DefaultLdapCodecService imp
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Control fromJndiControl( javax.naming.ldap.Control control ) throws DecoderException
     {
         IControlFactory factory = controlFactories.get( control.getID() );



Mime
View raw message