docs: public static String getRDN(String DN) {
          if (DN == null || DN.trim().length() == 0) {
              return DN;
          }
          String RDN = null;
          try {
              LdapName name = new LdapName(DN);
              if (name.size() == 0) {
                  return DN;
              }
              RDN = name.get(name.size() - 1);
          } catch (InvalidNameException e) {
              e.getMessage();
              DN = DN.trim();
              int pos1 = DN.indexOf(',');
              if (DN.charAt(pos1 - 1) == '\\') {
                  pos1 = DN.indexOf(pos1, ',');
              }
              if (pos1 > -1) {
                  RDN = DN.substring(0, pos1).trim();
              } else {
                  RDN = DN;
              }
          }
          return RDN;
      }