|
The fact is that when creating a BasicAttribute and adding it to a BasicAttributes, the latter MUST have been created using the constructor that declares it as case insensitive :
/* * create objectClass=top, objectClass=organizationalUnit */ boolean IGNORE_CASE = true; Attributes attributes = new BasicAttributes( IGNORE_CASE ); // Declares the BasicAttributes as case insensitive Attribute attribute = new BasicAttribute( "objectClass" ); attribute.add( "top" ); attribute.add( "organizationalUnit" ); attributes.put( attribute ); Attribute attr = attributes.get("objectclass"); Attribute attr2 = attributes.get("objectClass"); Assert.assertTrue( attr == attr2 ); // They now are equal There are places in the code where this is done, othere where it's not : org.apache.ldap.server.configuration.ContextPartitionConfiguration : private Attributes contextEntry = new BasicAttributes(); // Should be new BasicAttributes( true ); Committed changes that correct all misuses of BasicAttributes here:
http://svn.apache.org/viewcvs?rev=232433&view=rev Now all BasicAttriubtes are case insensitive for attribute Ids. This is consistent across the board. |
||||||||||||||||||||||||||||||||||||||||||||||||||
org.apache.dns.store.DnsRecordStateFactory.getStateToBind(),
org.apache.kerberos.store.operations.ChangePassword.execute()
org.apache.kerberos.store.operations.GetPrincipal.execute()
org.apache.ldap.common.ldif.LdifEntry.addModificationItem()
org.apache.ldap.server.exception.ExceptionServiceTest.testFailAddOnAlias()
...