Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0.AM26
-
None
Description
When an entry injected with ApplyLdifs uses uppercase DN: , it's merged with the previous entry. For instance, witch such a annotation :
@ApplyLdifs( { // Entry # 1 "DN: ou=People,o=isp", "objectClass: organizationalUnit", "objectClass: top", "ou: People", "DN: ou=Groups,o=isp", "objectClass: organizationalUnit", "objectClass: top", "ou: Groups", ...
the second entry will not be processed.
This is because the DSAnnotationProcessor.applyLdifs() method does :
String dnStart = "dn:"; StringBuilder sb = new StringBuilder(); for ( int i = 0; i < ldifs.length; ) { String s = ldifs[i++].trim(); if ( s.startsWith( dnStart ) ) { ...
The string should be lower cased :
if ( Strings.toLowerCaseAscii( s ).startsWith( dnStart ) )