mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 占翼 <zyzy...@gmail.com>
Subject Re: Is that a bug in ReferenceCountingFilter?
Date Thu, 17 Feb 2011 11:06:41 GMT
2011/2/17 占翼 <zyzy257@gmail.com>

>
>
> 2011/2/17 Emmanuel Lecharny <elecharny@gmail.com>
>
> 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 ?
>>>
>>>  Ok, got it. The ugly formatting made me think that the count++ was
>> outside the { }.
>>
>> Good catch. Will fix it in 2.0.3.
>>
>> Can you still create a JIRA so that I can close it ? It will be listed in
>> the released bug fixed when the release will be issued.
>>
>> Many thanks !
>>
>>
>> --
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
>>
>>
>
Ok, I will try to do this.
I created a question by JIRA.
URL: https://issues.apache.org/jira/browse/DIRMINA-820

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