Subject Jaybird 2.1.0 RC1 released - IndexOutOfBoundException
Author gamov2k2
I'm developing an application that make (intensive) use of the wonderful Event API.
I'm at the finishing stage and I encountered a little problem that seems IMHO a little bug:

When I do:
if (!eventManager.isConnected()) {
logger.debug("DataBaseEvent listener connected to DB");

after having added and removed EventListeners in the life cycle of my app, I get the
following error:

Exception in thread "Thread-5" java.lang.ArrayIndexOutOfBoundsException: -4
at org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl$
at corresponds to:
3061. int count = 0;
int shift = 0;
for (int i = buffer.length - 4;
i < buffer.length; i++){
3065. count += ((buffer[i] & 0xff) << shift);
shift += 8;

It looks like that the i = -4 (therefore buffer.length=0) therefore the buffer[i] is not valid.
Honestly, I have no idea what going on there.... just wanted to report it.

Best Regards,