You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2005/11/05 09:08:44 UTC
svn commit: r330982 -
/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java
Author: akarasulu
Date: Sat Nov 5 00:08:41 2005
New Revision: 330982
URL: http://svn.apache.org/viewcvs?rev=330982&view=rev
Log:
fixed bug where binary properties set were not put into environment when binary key was missing
Modified:
directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java?rev=330982&r1=330981&r2=330982&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java Sat Nov 5 00:08:41 2005
@@ -678,7 +678,7 @@
}
globalRegistries = new GlobalRegistries( bootstrapRegistries );
-
+ Set binaries = new HashSet();
if ( this.environment.containsKey( BINARY_KEY ) )
{
if ( log.isInfoEnabled() )
@@ -687,7 +687,6 @@
}
String binaryIds = ( String ) this.environment.get( BINARY_KEY );
- Set binaries = new HashSet();
if ( binaryIds == null )
{
if ( log.isWarnEnabled() )
@@ -714,32 +713,32 @@
+ BINARY_KEY );
}
}
+ }
- AttributeTypeRegistry registry = globalRegistries.getAttributeTypeRegistry();
- Iterator list = registry.list();
- while ( list.hasNext() )
+ // now get all the attributeTypes that are binary from the registry
+ AttributeTypeRegistry registry = globalRegistries.getAttributeTypeRegistry();
+ Iterator list = registry.list();
+ while ( list.hasNext() )
+ {
+ AttributeType type = ( AttributeType ) list.next();
+ if ( ! type.getSyntax().isHumanReadible() )
{
- AttributeType type = ( AttributeType ) list.next();
- if ( ! type.getSyntax().isHumanReadible() )
- {
- // add the OID for the attributeType
- binaries.add( type.getOid() );
+ // add the OID for the attributeType
+ binaries.add( type.getOid() );
- // add the lowercased name for the names for the attributeType
- String[] names = type.getNames();
- for ( int ii = 0; ii < names.length; ii++ )
- {
- binaries.add( StringUtils.lowerCase( StringUtils.trim( names[ii] ) ) );
- }
+ // add the lowercased name for the names for the attributeType
+ String[] names = type.getNames();
+ for ( int ii = 0; ii < names.length; ii++ )
+ {
+ binaries.add( StringUtils.lowerCase( StringUtils.trim( names[ii] ) ) );
}
}
+ }
- this.environment.put( BINARY_KEY, binaries );
-
- if ( log.isDebugEnabled() )
- {
- log.debug( "binary ids used: " + binaries );
- }
+ this.environment.put( BINARY_KEY, binaries );
+ if ( log.isDebugEnabled() )
+ {
+ log.debug( "binary ids used: " + binaries );
}
partitionNexus = new DefaultDirectoryPartitionNexus( new LockableAttributesImpl() );