Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-2303

ApplyLdifs treats entries with case sensitivity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0.AM26
    • 2.0.0.AM27
    • test
    • 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 ) )
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            elecharny Emmanuel L├ęcharny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: