if (pattern == null) return true;
    public boolean hasNoWildcards(String pattern) {        int scannedTo = 0;        int pos;        while ((pos = pattern.indexOf('%', scannedTo)) < pattern.length()) {            if (pos == -1) {                break;            }            if ((pos == 0) || (pattern.charAt(pos - 1) != '\\')) {                return false;            }            scannedTo = ++pos;        }        scannedTo = 0;        while ((pos = pattern.indexOf('_', scannedTo)) < pattern.length()) {            if (pos == -1) {                break;            }            if ((pos == 0) || (pattern.charAt(pos - 1) != '\\')) {                return false;            }            scannedTo = ++pos;        }        return true;    }