filterImpl = new FilterImpl(filter);
StringBuffer filterBuf = new StringBuffer(filter); int numAsteriskFound = 0;  int walkbackPos;   while (pos != -1) {   walkbackPos = pos-1;   while(walkbackPos >= 0 && Character.isWhitespace(filter.charAt(walkbackPos))) { walkbackPos--; } if (walkbackPos <0) {  break; }   if (filter.charAt(walkbackPos) != '(' || (walkbackPos > 0 && filter.charAt(walkbackPos-1) == '\\')) {  pos = filter.indexOf("signer",pos+6); continue; } pos+=6;   while (Character.isWhitespace(filter.charAt(pos))) { pos++; }   if (filter.charAt(pos) != '=') {  pos = filter.indexOf("signer",pos); continue; } pos++;   while (!(filter.charAt(pos) == ')' && filter.charAt(pos-1) != '\\')) { if (filter.charAt(pos) == '*') { filterBuf.insert(pos+numAsteriskFound,'\\'); numAsteriskFound++; } pos++; }   pos = filter.indexOf("signer",pos); } filter = filterBuf.toString(); }  filterImpl = new FilterImpl(filter);
    private Filter getFilterImpl() {    	if (filterImpl == null) {    		try {        		if (filter.indexOf('*') != -1) {        			//escape out * for filter        			StringBuffer patternBuffer = new StringBuffer();        			for (int pos = 0;pos < filter.length();pos++) {        				if (filter.charAt(pos) == '*') {        					patternBuffer.append('\\');        				}        				patternBuffer.append(filter.charAt(pos));        			}        			filter = patternBuffer.toString();        		}    							filterImpl = new FilterImpl(filter);			} catch (InvalidSyntaxException e) {				//we will return null			}    	}     		    	return filterImpl;    }