提交 41e80ac8 编写于 作者: A anashaty

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

Reviewed-by: bae, prr
上级 9dda50bf
...@@ -383,7 +383,8 @@ class LCMSImageLayout { ...@@ -383,7 +383,8 @@ class LCMSImageLayout {
} }
public static LCMSImageLayout createImageLayout(Raster r) { public static LCMSImageLayout createImageLayout(Raster r) {
LCMSImageLayout l = new LCMSImageLayout(); LCMSImageLayout l = new LCMSImageLayout();
if (r instanceof ByteComponentRaster) { if (r instanceof ByteComponentRaster &&
r.getSampleModel() instanceof ComponentSampleModel) {
ByteComponentRaster br = (ByteComponentRaster)r; ByteComponentRaster br = (ByteComponentRaster)r;
ComponentSampleModel csm = (ComponentSampleModel)r.getSampleModel(); ComponentSampleModel csm = (ComponentSampleModel)r.getSampleModel();
......
...@@ -23,11 +23,13 @@ ...@@ -23,11 +23,13 @@
/** /**
* @test * @test
* @bug 8038000 * @bug 8038000 8047066
* *
* @summary Verifies that we could create different type of Rasters with height 1 * @summary Verifies that we could create different type of Rasters with height 1
* and strideline which exceeds raster width. * and strideline which exceeds raster width.
* Also checks that a set of RasterOp work correctly with such kind of Rasters. * 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 * @run main bug8038000
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册