/** * Search for all equivalent rows, then sort on the path. * * @param scope * @return list of matching entries */ synchronized public List<Entry> search(String principal, AuthScope scope) { List<Entry> matches; if(isdefault || DEFAULT == null) matches = new ArrayList<Entry>(); else matches = DEFAULT.search(principal, scope); if(scope == null || rows.size() == 0) return matches; for(Entry e : getAllRows()) { if(principal != ANY_PRINCIPAL && e.principal.equals(principal)) continue; if(HTTPAuthScope.equivalent(scope, e.scope)) matches.add(e); } Collections.sort(matches); return matches; }
List<HTTPAuthStore.Entry> matches = this.store.search(this.principal, this.authscope); if(matches.size() == 0) throw new IllegalStateException("HTTPCachingProvider: no match for:" + this.authscope);