I've run into a bug in DefaultFileRegion.  In the method

public void setPosition(long value) {
        if (value < position) {
            throw new IllegalArgumentException("New position value may not
be less than old position value");
        }
        count += value - position;
        position = value;
}

I believe it should be

count -= value - position;

instead.

Also,  SocketIoProcessor#clearWriteRequestQueue the WriteRequest message is
cast to a ByteBuffer, which will fail if the message is a DefaultFileRegion.

I would be happy to enter the two bugs in Jira if thats the correct
procedure.

-geoff

Reply via email to