[
https://issues.apache.org/jira/browse/DIRSERVER-2303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lécharny resolved DIRSERVER-2303.
------------------------------------------
Resolution: Fixed
Fixed with commit af1a7b2
> ApplyLdifs treats entries with case sensitivity
> -----------------------------------------------
>
> Key: DIRSERVER-2303
> URL: https://issues.apache.org/jira/browse/DIRSERVER-2303
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: test
> Affects Versions: 2.0.0.AM26
> Reporter: Emmanuel Lécharny
> Priority: Major
> Fix For: 2.0.0.AM27
>
>
> When an entry injected with {{ApplyLdifs}} uses uppercase {{DN:}} , it's
> merged with the previous entry. For instance, witch such a annotation :
> {noformat}
> @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",
> ...
> {noformat}
> the second entry will not be processed.
> This is because the {{DSAnnotationProcessor.applyLdifs()}} method does :
> {code:java}
> String dnStart = "dn:";
> StringBuilder sb = new StringBuilder();
> for ( int i = 0; i < ldifs.length; )
> {
> String s = ldifs[i++].trim();
> if ( s.startsWith( dnStart ) )
> {
> ...
> {code}
> The string should be lower cased :
> {code:java}
> if ( Strings.toLowerCaseAscii( s ).startsWith( dnStart ) )
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]