mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Is that a bug in ReferenceCountingFilter?
Date Thu, 17 Feb 2011 10:37:50 GMT
On 2/17/11 11:07 AM, 占翼 wrote:
> 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 ?
>
Not sure I understand what is the problem : both methods are the same, 
and "causes the filter not work well" does not give us a clue about what 
is the problem : is the filter generating random numbers, throws an 
exception, or prints out some insults on the console ?

Also, which version of MINA are you using ?

Last thing, if you think it's a bug, please fill a JIRA, it's easier for 
us and you to track down the problem.

Thanks !

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Mime
View raw message