mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 占翼 <zyzy...@gmail.com>
Subject Is that a bug in ReferenceCountingFilter?
Date Thu, 17 Feb 2011 10:07:44 GMT
hello

It's seem like a bug in org.apache.mina.filter.util.ReferenceCountingFilter

  * public synchronized void onPreAdd(IoFilterChain parent, String name,*
*            NextFilter nextFilter) throws Exception {*
*        if (0 == count) {*
*            filter.init();*
*++count;*
**
*        }*
**
*        *
*        filter.onPreAdd(parent, name, nextFilter);*
*    }*
it cause the filter not work well.

I think the code should be
*public synchronized void onPreAdd(IoFilterChain parent, String name,*
*            NextFilter nextFilter) throws Exception {*
*        if (0 == count) {*
*            filter.init();*
**
*        }*
*++count;*
**
*        *
*        filter.onPreAdd(parent, name, nextFilter);*
*    }*
**
Is that a bug ?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message