geotools/geotools — pull request #134 by DieterDePaepe (2013-02-15 21:46:28+00:00)
Title: [GEOT-2791] Fixed IllegalArgument in buffer when reading a sparse shape file

The original implementation assumed all entries a shape file were in order, which does not hold up for sparse shape files. This resulted in an IllegalArgument when setting the buffer. This in turn resulted in not all entries being read.

This patch ensures the buffer is either addressable, or reloads it from the Channel being read.