134135136137138139140141142143144
if (pos.get() < n) { FilterConfigImpl filterConfig = filters[pos.getAndIncrement()]; Filter filter = null; try { filter = filterConfig.getFilter(); filter.doFilter(request, response, this); } catch (IOException e) { throw e; } catch (ServletException e) { throw e; } catch (RuntimeException e) {
5556575859606162636465
if (this.current < this.filters.length) { // continue filtering with the next filter Filter filter = this.filters[this.current]; trackFilter(slingRequest, filter); filter.doFilter(slingRequest, slingResponse, this); } else { this.render(slingRequest, slingResponse);
6465666768697071727374
if (filter instanceof AbstractFilter) { AbstractFilter bf = (AbstractFilter) filter; if ( bf.isMappedToCurrentRequestPath(request) ) { filter.doFilter(request, response, this); } else { this.doFilter(request, response); }
7374757677787980818283
this.doFilter(request, response); } } else { filter.doFilter(request, response, this); } } else { chain.doFilter(request, response);
5960616263646566676869
MDC.clear(); Filter filter = new MDCFilter(); filter.init(null); filter.doFilter(request, response, chain); Assert.assertTrue(invoked.get()); Assert.assertNull(MDC.get("hostname")); Assert.assertNull(MDC.get("user")); Assert.assertNull(MDC.get("method")); Assert.assertNull(MDC.get("path"));
8586878889909192939495
Assert.assertEquals(MDC.get("method"), "METHOD"); Assert.assertEquals(MDC.get("path"), "/pathinfo"); invoked.set(true); } }; filter.doFilter(request, response, chain); Assert.assertTrue(invoked.get()); HostnameFilter.HOSTNAME_TL.set("HOST"); invoked.set(false);
102103104105106107108109110111112
Assert.assertEquals(MDC.get("method"), "METHOD"); Assert.assertEquals(MDC.get("path"), "/pathinfo"); invoked.set(true); } }; filter.doFilter(request, response, chain); Assert.assertTrue(invoked.get()); HostnameFilter.HOSTNAME_TL.remove(); filter.destroy();
5051525354555657585960
}; Filter filter = new HostnameFilter(); filter.init(null); Assert.assertNull(HostnameFilter.get()); filter.doFilter(request, response, chain); Assert.assertTrue(invoked.get()); Assert.assertNull(HostnameFilter.get()); filter.destroy(); }
230231232233234235236237238239240
SecurityUtil.doAsPrivilege ("doFilter", filter, classType, args); args = null; } else { filter.doFilter(request, response, this); } support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT, filter, request, response); } catch (IOException e) {
6768697071727374757677
t.addThreadCleanupListener(l); HttpServletRequest request = new MockRequest(); f.doFilter(request, new MockResponse(), new MockFilterChain()); assertSame(r, HiveMindFilter.getRegistry(request)); assertEquals(true, l.getCleanup());