if (filter.indexOf('*') != -1) {  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(); }
int pos = filter.indexOf("signer"); if (pos != -1){
    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;    }