This was caused by my changes for:
6299405: ImageInputStreamImpl still uses a finalize() which causes
As part of that fix I changed FileCacheImageInputStream.close() so that it
nulls out its reference to the cache object. The JCK test was just lucky
before that it got an IOException when trying to call read() after close().
It turns out that FCIIS.read() does not properly call checkClosed(), so
it will continue on and try to access the cache, which is now nulled out
by close(), and thus the NPE instead of IOE. The fix is to change
FCIIS.read() to call checkClosed() as it is supposed to do.
While looking into this bug, I've found that the various stream classes
are a bit inconsistent in the way that they check parameters to read/write
methods. We should probably clean this up. Also, it looks like the
FileCacheImageOutputStream.read() methods do not call checkClosed() either!