private String partiallyEscapeAssertionValue(String assertionValue){
  StringBuilder sb=new StringBuilder(assertionValue.length());
  for (int j=0; j < assertionValue.length(); j++) {
    char c=assertionValue.charAt(j);
    if (c == '*') {
      sb.append(c);
    }
 else {
      sb.append(Filter.escapeAssertionValue(String.valueOf(c)));
    }
  }
  return sb.toString();
}

private String partiallyEscapeAssertionValue ( String assertionValue ) { StringBuilder sb = new StringBuilder ( assertionValue . length ( ) ) ; for ( int j = 0 ; j < assertionValue . length ( ) ; j ++ ) { char c = assertionValue . charAt ( j ) ; if ( c == '*' ) { sb . append ( c ) ; } else { sb . append ( Filter . escapeAssertionValue ( String . valueOf ( c ) ) ) ; } } return sb . toString ( ) ; }
escapes the provided assertion value according to the ldap standard . as a special case this method does not escape the ' * ' character , in order to be able to use wildcards in filters .
