[OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception
Phil Race
philip.race at oracle.com
Tue Mar 29 22:31:07 UTC 2016
On 03/29/2016 02:37 PM, Jim Graham wrote:
> Raster.java, line 894: Why was the test for dataType removed from this
> if statement?
In a previous version ..
http://cr.openjdk.java.net/~arapte/ajit/6353518/webrev.02/src/java.desktop/share/classes/java/awt/image/Raster.java.sdiff.html
Ajit had added a condition :
890 if (dataType == DataBuffer.TYPE_BYTE &&
891 dataBuffer instanceof DataBufferByte &&
But we don't need both of these.
DataBufferByte should always be DataBuffer.TYPE_BYTE and we do the cast
so it had better be DataBufferByte.
-phil.
More information about the 2d-dev
mailing list