commons.collections.buffer.BlockingBuffer throws BufferUnderflowException

Why does that make sense? I would think that a BlockingBuffer cannot underflow on a get().

Looking at the code for get() I see:

   public Object get() {
        synchronized (lock) {
            while (collection.isEmpty()) {
                try {
                    wait();
                } catch (InterruptedException e) {
                    throw new BufferUnderflowException();
                }
            }
            return getBuffer().get();
        }
    }

So, an InterruptedException is turned into a BufferUnderflowException.

Usually InterruptedException is just re-thrown. I don't understand how to interpret the conversion to a BufferUnderflowException, and whether I can / should safely ignore it.

Anyone?

Pito



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to