X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Fcore%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Ffilter%2FSideChain.java;h=18e76b96fd2b27109a0ca1625a0aa38285fdb8a5;hb=3d1706fcbe7f95830ff6fd23cf679ee55c6d0595;hp=8283b4dd73f4f20e3c01d2a9c99a2a1ea374fd63;hpb=5677039c46e3514174f1bc299f5c8e6e8a568824;p=aaf%2Fauthz.git diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/filter/SideChain.java b/cadi/core/src/main/java/org/onap/aaf/cadi/filter/SideChain.java index 8283b4dd..18e76b96 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/filter/SideChain.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/filter/SideChain.java @@ -38,36 +38,36 @@ import javax.xml.ws.Holder; * */ public class SideChain { - private List sideChain; - - public SideChain() { - sideChain = new ArrayList(); - } - - public void add(Filter f) { - sideChain.add(f); - } - + private List sideChain; + + public SideChain() { + sideChain = new ArrayList(); + } + + public void add(Filter f) { + sideChain.add(f); + } + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)throws IOException, ServletException { - final Holder hbool = new Holder(Boolean.TRUE); - FilterChain truth = new FilterChain() { - @Override - public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { - hbool.value=Boolean.TRUE; - } - public String toString() { - return hbool.value.toString(); - } - }; - for(Filter f : sideChain) { - hbool.value=Boolean.FALSE; - f.doFilter(request, response, truth); - if(!hbool.value) { - return; - } - } - if(hbool.value) { - chain.doFilter(request, response); - } + final Holder hbool = new Holder(Boolean.TRUE); + FilterChain truth = new FilterChain() { + @Override + public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { + hbool.value=Boolean.TRUE; + } + public String toString() { + return hbool.value.toString(); + } + }; + for(Filter f : sideChain) { + hbool.value=Boolean.FALSE; + f.doFilter(request, response, truth); + if(!hbool.value) { + return; + } + } + if(hbool.value) { + chain.doFilter(request, response); + } } }