directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r691024 [2/2] - in /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core: authz/ changelog/ collective/ event/ exception/ jndi/
Date Mon, 01 Sep 2008 17:43:53 GMT
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.java
Mon Sep  1 10:43:52 2008
@@ -25,8 +25,6 @@
 import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
@@ -41,6 +39,8 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.SchemaViolationException;
 import javax.naming.ldap.LdapContext;
 import javax.naming.spi.DirObjectFactory;
@@ -114,7 +114,7 @@
 
                 if ( inAttrs == null )
                 {
-                    outAttrs = new AttributesImpl( true );
+                    outAttrs = new BasicAttributes( true );
                 }
                 else
                 {
@@ -124,7 +124,7 @@
                 // Set up object class
                 if ( outAttrs.get( "objectclass" ) == null )
                 {
-                    Attribute oc = new AttributeImpl( "objectclass", "person" );
+                    Attribute oc = new BasicAttribute( "objectclass", "person" );
                     oc.add( "top" );
                     outAttrs.put( oc );
                 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
Mon Sep  1 10:43:52 2008
@@ -28,8 +28,6 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -51,6 +49,8 @@
 import javax.naming.ReferralException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
@@ -108,7 +108,7 @@
         // -------------------------------------------------------------------
 
         // Add a referral entry ( should be fine with or without the control )
-        Attributes referral = new AttributesImpl( "objectClass", "top", true );
+        Attributes referral = new BasicAttributes( "objectClass", "top", true );
         referral.get( "objectClass" ).add( "referral" );
         referral.get( "objectClass" ).add( "extensibleObject" );
         referral.put( "ref", ref0 );
@@ -187,7 +187,7 @@
         // -------------------------------------------------------------------
 
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
-        Attributes userEntry = new AttributesImpl( "objectClass", "top", true );
+        Attributes userEntry = new BasicAttributes( "objectClass", "top", true );
         userEntry.get( "objectClass" ).add( "person" );
         userEntry.put( "sn", "karasulu" );
         userEntry.put( "cn", "alex karasulu" );
@@ -221,7 +221,7 @@
         // -------------------------------------------------------------------
 
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
-        Attributes userEntry = new AttributesImpl( "objectClass", "top", true );
+        Attributes userEntry = new BasicAttributes( "objectClass", "top", true );
         userEntry.get( "objectClass" ).add( "person" );
         userEntry.put( "sn", "karasulu" );
         userEntry.put( "cn", "alex karasulu" );
@@ -396,7 +396,7 @@
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
         try
         {
-            td.refCtx.modifyAttributes( "cn=alex karasulu", DirContext.ADD_ATTRIBUTE, new
AttributesImpl(
+            td.refCtx.modifyAttributes( "cn=alex karasulu", DirContext.ADD_ATTRIBUTE, new
BasicAttributes(
                 "description", "just some text", true ) );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -427,7 +427,7 @@
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
         try
         {
-            td.refCtx.modifyAttributes( "cn=alex karasulu,ou=apache", DirContext.ADD_ATTRIBUTE,
new AttributesImpl(
+            td.refCtx.modifyAttributes( "cn=alex karasulu,ou=apache", DirContext.ADD_ATTRIBUTE,
new BasicAttributes(
                 "description", "just some text", true ) );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -459,7 +459,7 @@
         try
         {
             ModificationItemImpl[] mods = new ModificationItemImpl[]
-                { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, new AttributeImpl(
"description", "just some text" ) ) };
+                { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, new BasicAttribute(
"description", "just some text" ) ) };
             td.refCtx.modifyAttributes( "cn=alex karasulu", mods );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -491,7 +491,7 @@
         try
         {
             ModificationItemImpl[] mods = new ModificationItemImpl[]
-                { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, new AttributeImpl(
"description", "just some text" ) ) };
+                { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, new BasicAttribute(
"description", "just some text" ) ) };
             td.refCtx.modifyAttributes( "cn=alex karasulu,ou=apache", mods );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -821,7 +821,7 @@
         addReferralEntry();
 
         LdapContext userCtx;
-        Attributes referral = new AttributesImpl( "objectClass", "top", true );
+        Attributes referral = new BasicAttributes( "objectClass", "top", true );
         referral.get( "objectClass" ).add( "person" );
         referral.put( "cn", "akarasulu" );
         referral.put( "sn", "karasulu" );
@@ -855,7 +855,7 @@
         addReferralEntry();
 
         LdapContext userCtx = null;
-        Attributes referral = new AttributesImpl( "objectClass", "top", true );
+        Attributes referral = new BasicAttributes( "objectClass", "top", true );
         referral.get( "objectClass" ).add( "person" );
         referral.get( "objectClass" ).add( SchemaConstants.EXTENSIBLE_OBJECT_OC );
         referral.put( "cn", "akarasulu" );
@@ -880,8 +880,8 @@
         }
         try
         {
-            Attributes attrs = new AttributesImpl( "ou", "deep" );
-            Attribute oc = new AttributeImpl( "ObjectClass" );
+            Attributes attrs = new BasicAttributes( "ou", "deep", true );
+            Attribute oc = new BasicAttribute( "ObjectClass" );
             oc.add( "top" );
             oc.add( "organizationalUnit" );
             attrs.put( oc );
@@ -1058,14 +1058,14 @@
     {
         addReferralEntry();
 
-        Attributes attrs = new AttributesImpl( true );
+        Attributes attrs = new BasicAttributes( true );
 
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "extensibleObject" );
         oc.add( "referral" );
         attrs.put( oc );
         
-        Attribute ref = new AttributeImpl( "ref", "ldap://" );
+        Attribute ref = new BasicAttribute( "ref", "ldap://" );
         attrs.put( ref );
 
         attrs.put( "cn", "refWithEmptyDN" );
@@ -1095,14 +1095,14 @@
     {
         addReferralEntry();
 
-        Attributes attrs = new AttributesImpl( true );
+        Attributes attrs = new BasicAttributes( true );
 
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "extensibleObject" );
         oc.add( "referral" );
         attrs.put( oc );
         
-        Attribute ref = new AttributeImpl( "ref", "ldap://localhost/cn=RefWithAttributes?cn"
);
+        Attribute ref = new BasicAttribute( "ref", "ldap://localhost/cn=RefWithAttributes?cn"
);
         attrs.put( ref );
 
         attrs.put( "cn", "RefWithAttributes" );
@@ -1132,13 +1132,13 @@
     {
         addReferralEntry();
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "extensibleObject" );
         oc.add( "referral" );
         attrs.put( oc );
         
-        Attribute ref = new AttributeImpl( "ref", "ldap://localhost/cn=RefWithScope??sub"
);
+        Attribute ref = new BasicAttribute( "ref", "ldap://localhost/cn=RefWithScope??sub"
);
         attrs.put( ref );
 
         attrs.put( "cn", "RefWithScope" );
@@ -1168,13 +1168,13 @@
     {
         addReferralEntry();
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "extensibleObject" );
         oc.add( "referral" );
         attrs.put( oc );
         
-        Attribute ref = new AttributeImpl( "ref", "ldap://localhost/cn=RefWithFilter???(cn=*)"
);
+        Attribute ref = new BasicAttribute( "ref", "ldap://localhost/cn=RefWithFilter???(cn=*)"
);
         attrs.put( ref );
 
         attrs.put( "cn", "RefWithFilter" );
@@ -1204,13 +1204,13 @@
     {
         addReferralEntry();
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "extensibleObject" );
         oc.add( "referral" );
         attrs.put( oc );
         
-        Attribute ref = new AttributeImpl( "ref", "ldap://localhost/cn=RefWithExtension????x-extension=1.2.3.4"
);
+        Attribute ref = new BasicAttribute( "ref", "ldap://localhost/cn=RefWithExtension????x-extension=1.2.3.4"
);
         attrs.put( ref );
 
         attrs.put( "cn", "RefWithExtension" );
@@ -1240,13 +1240,13 @@
     {
         addReferralEntry();
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "extensibleObject" );
         oc.add( "referral" );
         attrs.put( oc );
         
-        Attribute ref = new AttributeImpl( "ref", "ldap://localhost/cn=RefWithCriticalExtension????!x-extension=1.2.3.4"
);
+        Attribute ref = new BasicAttribute( "ref", "ldap://localhost/cn=RefWithCriticalExtension????!x-extension=1.2.3.4"
);
         attrs.put( ref );
 
         attrs.put( "cn", "RefWithCriticalExtension" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
Mon Sep  1 10:43:52 2008
@@ -28,8 +28,6 @@
 import org.apache.directory.shared.ldap.exception.LdapSizeLimitExceededException;
 import org.apache.directory.shared.ldap.exception.LdapTimeLimitExceededException;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -46,6 +44,8 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
@@ -80,8 +80,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -103,8 +103,8 @@
         /*
          * create ou=testing01,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -126,8 +126,8 @@
         /*
          * create ou=testing02,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -152,8 +152,8 @@
          */
         ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -175,8 +175,8 @@
         assertTrue( attribute.contains( "organizationalUnit" ) );
 
         // Create entry cn=Heather Nova, ou=system
-        Attributes heather = new AttributesImpl();
-        Attribute ocls = new AttributeImpl( "objectClass" );
+        Attributes heather = new BasicAttributes( true );
+        Attribute ocls = new BasicAttribute( "objectClass" );
         ocls.add( "top" );
         ocls.add( "person" );
         heather.put( ocls );
@@ -205,7 +205,7 @@
         // if nis is disabled then enable it
         if ( isNisDisabled )
         {
-            Attribute disabled = new AttributeImpl( "m-disabled" );
+            Attribute disabled = new BasicAttribute( "m-disabled" );
             ModificationItemImpl[] mods = new ModificationItemImpl[] {
                 new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, disabled ) };
             schemaRoot.modifyAttributes( "cn=nis", mods );
@@ -225,7 +225,7 @@
 
     private DirContext addNisPosixGroup( String name, int gid ) throws Exception
     {
-        Attributes attrs = new AttributesImpl( "objectClass", "top", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "top", true );
         attrs.get( "objectClass" ).add( "posixGroup" );
         attrs.put( "cn", name );
         attrs.put( "gidNumber", String.valueOf( gid ) );
@@ -721,8 +721,8 @@
      */
     protected Attributes getPersonAttributes( String sn, String cn )
     {
-        Attributes attributes = new AttributesImpl();
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "person" );
         attributes.put( attribute );
@@ -1263,8 +1263,8 @@
         // Create an entry with special chars in the description attribute
         LdapContext sysRoot = getSystemContext( service );
         // Create entry cn=Sid Vicious, ou=system
-        Attributes vicious = new AttributesImpl();
-        Attribute ocls = new AttributeImpl( "objectClass" );
+        Attributes vicious = new BasicAttributes( true );
+        Attribute ocls = new BasicAttribute( "objectClass" );
         ocls.add( "top" );
         ocls.add( "person" );
         vicious.put( ocls );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
Mon Sep  1 10:43:52 2008
@@ -33,8 +33,6 @@
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 
 import static org.junit.Assert.assertFalse;
@@ -46,6 +44,8 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
@@ -87,7 +87,7 @@
         // if nis is disabled then enable it
         if ( isNisDisabled )
         {
-            Attribute disabled = new AttributeImpl( "m-disabled" );
+            Attribute disabled = new BasicAttribute( "m-disabled" );
             ModificationItemImpl[] mods = new ModificationItemImpl[] {
                 new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, disabled ) };
             schemaRoot.modifyAttributes( "cn=nis", mods );
@@ -107,7 +107,7 @@
 
     private DirContext addNisPosixGroup( String name, int gid ) throws Exception
     {
-        Attributes attrs = new AttributesImpl( "objectClass", "top", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "top", true );
         attrs.get( "objectClass" ).add( "posixGroup" );
         attrs.put( "cn", name );
         attrs.put( "gidNumber", String.valueOf( gid ) );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/UniqueMemberIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/UniqueMemberIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/UniqueMemberIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/UniqueMemberIT.java
Mon Sep  1 10:43:52 2008
@@ -25,8 +25,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
@@ -39,6 +37,8 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
@@ -70,11 +70,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "cn=kevin spacey, dc=example, dc=org"
);
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "cn=kevin spacey, dc=example,
dc=org" );
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -142,11 +142,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey 2" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "cn=kevin spacey 2, dc=example,
dc=org#'010101'B" );
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey 2" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "cn=kevin spacey 2, dc=example,
dc=org#'010101'B" );
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -214,11 +214,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey bad" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "kevin spacey bad, dc=example,
dc=org#'010101'B" );
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey bad" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "kevin spacey bad, dc=example,
dc=org#'010101'B" );
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -248,11 +248,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey bad 2" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "cn=kevin spacey bad 2, dc=example,
dc=org#'010101'" );
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey bad 2" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "cn=kevin spacey bad 2, dc=example,
dc=org#'010101'" );
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -277,11 +277,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "cn=kevin spacey, dc=example, dc=org"
);
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "cn=kevin spacey, dc=example,
dc=org" );
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -329,11 +329,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "cn=kevin spacey,dc=example,dc=org"
);
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "cn=kevin spacey,dc=example,dc=org"
);
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -381,11 +381,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "cn=kevin spacey,dc=example,dc=org"
);
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "cn=kevin spacey,dc=example,dc=org"
);
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -420,11 +420,11 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "groupOfUniqueNames" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey" );
-        Attribute dc = new AttributeImpl( "uniqueMember", "cn=kevin spacey,dc=example,dc=org#'010101'B"
);
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
+        Attribute dc = new BasicAttribute( "uniqueMember", "cn=kevin spacey,dc=example,dc=org#'010101'B"
);
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);



Mime
View raw message