mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: ArrayIndexOutOfBoundsException in CircularQueue.
Date Sun, 03 Feb 2008 08:29:10 GMT
Hi Yui,

Thanks for the report.  I have been extremely busy with reorganizing
my workstation due to some crash recently.  Let me take a look into
the problem soon...

CircularQueue performs better than LinkedQueue according to my
previous benchmark.  There's something that's very close to
CircularQueue in Java 6, but we need to keep MINA working on Java 5.

Thanks,
Trustin

On Feb 2, 2008 7:07 PM, Makoto YUI <yuin405@gmail.com> wrote:
>
> Hi,
>
> With replacing CircularQueue with LinkedQueue, my task is working fine.
>
> BTW, I have reviewed CircularQueue class.
>
> Is not CircularQueue#increaseSize() wrong?
>
> | private void increaseSize() {
> |  last = (last + 1) & mask;
> |  full = first == last; // this check condition is insufficient.
> | }
>
> This full flag affect shrinkIfNeeded() via size().
>
> Moreover, both of isEmpty() and remove(int) seem strange.
>
> e.g.,
> |    public boolean isEmpty() {
> |        return (first == last) && !full;  // should return (first == last)
> |    }
>
> Makoto
> --
> View this message in context: http://www.nabble.com/mina-and-jdk6u4-tp14922204s16868p15241380.html
>
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
>
>



-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Mime
View raw message