--- old/test/jdk/java/awt/dnd/ImageTransferTest/ImageTransferTest.java 2018-11-07 15:25:20.067300000 +0530 +++ new/test/jdk/java/awt/dnd/ImageTransferTest/ImageTransferTest.java 2018-11-07 15:25:19.643300000 +0530 @@ -24,7 +24,7 @@ /* * @test * @key headful - * @bug 4397404 4720930 8197926 + * @bug 4397404 4720930 8197926 8176556 * @summary tests that images of all supported native image formats are * transferred properly * @library /test/lib @@ -149,23 +149,23 @@ int h = 100; int[] pix = new int[w * h]; + BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); int index = 0; for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { int red = 127; int green = 127; int blue = y > h / 2 ? 127 : 0; - int alpha = 255; if (x < w / 4 && y < h / 4) { - alpha = 0; red = 0; } - pix[index++] = - (alpha << 24) | (red << 16) | (green << 8) | blue; + pix[index] = + (red << 16) | (green << 8) | blue; + img.setRGB(x, y, pix[index]); + index++; } } - return Toolkit.getDefaultToolkit(). - createImage(new MemoryImageSource(w, h, pix, 0, w)); + return (Image)img; } @@ -233,7 +233,7 @@ int width = image.getWidth(null); int height = image.getHeight(null); BufferedImage bimage = - new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = bimage.createGraphics(); try { g2d.drawImage(image, 0, 0, width, height, null);