8047066: Test test/sun/awt/image/bug8038000.java fails with ClassCastException

Reviewed-by: bae, prr
This commit is contained in:
Anton Nashatyrev 2014-07-08 16:42:23 +04:00
parent 89e241569b
commit 021ffcfbdf
2 changed files with 5 additions and 2 deletions

View File

@ -384,7 +384,8 @@ class LCMSImageLayout {
}
public static LCMSImageLayout createImageLayout(Raster r) {
LCMSImageLayout l = new LCMSImageLayout();
if (r instanceof ByteComponentRaster) {
if (r instanceof ByteComponentRaster &&
r.getSampleModel() instanceof ComponentSampleModel) {
ByteComponentRaster br = (ByteComponentRaster)r;
ComponentSampleModel csm = (ComponentSampleModel)r.getSampleModel();

View File

@ -23,11 +23,13 @@
/**
* @test
* @bug 8038000
* @bug 8038000 8047066
*
* @summary Verifies that we could create different type of Rasters with height 1
* and strideline which exceeds raster width.
* Also checks that a set of RasterOp work correctly with such kind of Rasters.
* For 8047066 verifies that ColorConvertOp could process
* Raster (ByteBuffer + SinglePixelPackedSampleModel)
*
* @run main bug8038000
*/