@Test public void defaultCase() { assertTrue(TeeFilter.computeActivation("somehost", "", "")); assertTrue(TeeFilter.computeActivation("somehost", null, null)); }
static boolean computeActivation(String hostname, String includeListAsStr, String excludeListAsStr) { List<String> includeList = extractNameList(includeListAsStr); List<String> excludeList = extractNameList(excludeListAsStr); boolean inIncludesList = mathesIncludesList(hostname, includeList); boolean inExcludesList = mathesExcludesList(hostname, excludeList); return inIncludesList && (!inExcludesList); }
TeeFilter implements Filter { static boolean computeActivation(String hostname, String includeListAsStr, String excludeListAsStr) { List<String> includeList = extractNameList(includeListAsStr); List<String> excludeList = extractNameList(excludeListAsStr); boolean inIncludesList = mathesIncludesList(hostname, includeList); boolean inExcludesList = mathesExcludesList(hostname, excludeList); return inIncludesList && (!inExcludesList); } }
TeeFilter implements Filter { static boolean computeActivation(String hostname, String includeListAsStr, String excludeListAsStr) { List<String> includeList = extractNameList(includeListAsStr); List<String> excludeList = extractNameList(excludeListAsStr); boolean inIncludesList = mathesIncludesList(hostname, includeList); boolean inExcludesList = mathesExcludesList(hostname, excludeList); return inIncludesList && (!inExcludesList); }  }
TeeFilter implements Filter { static boolean computeActivation(String hostname, String includeListAsStr, String excludeListAsStr) { List<String> includeList = extractNameList(includeListAsStr); List<String> excludeList = extractNameList(excludeListAsStr); boolean inIncludesList = mathesIncludesList(hostname, includeList); boolean inExcludesList = mathesExcludesList(hostname, excludeList); return inIncludesList && (!inExcludesList); }  @Override void destroy(); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain); @Override void init(FilterConfig filterConfig); }
TeeFilter implements Filter { static boolean computeActivation(String hostname, String includeListAsStr, String excludeListAsStr) { List<String> includeList = extractNameList(includeListAsStr); List<String> excludeList = extractNameList(excludeListAsStr); boolean inIncludesList = mathesIncludesList(hostname, includeList); boolean inExcludesList = mathesExcludesList(hostname, excludeList); return inIncludesList && (!inExcludesList); }  @Override void destroy(); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain); @Override void init(FilterConfig filterConfig);  }