@Test public void testGetUserNameMatcherNoPostInUri() throws Exception { String uri = "/aaa/users/user1@domain"; Matcher m = filter.getUserNameMatcher(uri); boolean isMatch = m.find(); String pre = isMatch ? m.group("pre") : null; String userName = isMatch ? m.group("username") : null; String post = isMatch ? m.group("post") : null; assertTrue(isMatch); assertEquals("/aaa/users/", pre); assertEquals("user1@domain", userName); assertEquals("", post); }
protected Matcher getUserNameMatcher(String requestUri) { return USER_NAME_IN_URI_REGEXP.matcher(requestUri); }
UserNameOverrideFilter implements Filter { protected Matcher getUserNameMatcher(String requestUri) { return USER_NAME_IN_URI_REGEXP.matcher(requestUri); } }
UserNameOverrideFilter implements Filter { protected Matcher getUserNameMatcher(String requestUri) { return USER_NAME_IN_URI_REGEXP.matcher(requestUri); }  }
UserNameOverrideFilter implements Filter { protected Matcher getUserNameMatcher(String requestUri) { return USER_NAME_IN_URI_REGEXP.matcher(requestUri); }  @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy(); }
UserNameOverrideFilter implements Filter { protected Matcher getUserNameMatcher(String requestUri) { return USER_NAME_IN_URI_REGEXP.matcher(requestUri); }  @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy();  }