--- old/test/javax/imageio/plugins/shared/BitDepth.java 2016-02-11 17:59:28.570596173 -0800 +++ new/test/javax/imageio/plugins/shared/BitDepth.java 2016-02-11 17:59:28.434596169 -0800 @@ -130,11 +130,7 @@ boolean allOK = true; - for (int i = 0; i < biRGBTypes.length; i++) { - - int type = biRGBTypes[i]; - - + for (int type : biRGBTypes) { // TODO: remove the following 'if' block after the 8147448 fix if ( format.toLowerCase().equals("bmp") && ( (type == BufferedImage.TYPE_INT_ARGB ) || @@ -151,12 +147,24 @@ System.out.println("Testing " + format + " writer for type " + biTypeNames[type]); - File f = testWriteRGB(format, type); - boolean ok = testReadRGB(f); - if (ok) { - f.delete(); + boolean ok = false; + File f = null; + try { + f = testWriteRGB(format, type); + ok = testReadRGB(f); + } catch (javax.imageio.IIOException e) { + // The follow two formats are not supported on OpenJDK + // for jpg files. + if (format.toLowerCase().equals("jpg") && + (type == BufferedImage.TYPE_4BYTE_ABGR || + type == BufferedImage.TYPE_4BYTE_ABGR_PRE)) + continue; + } finally { + if (ok) { + f.delete(); + } + allOK = allOK && (ok || f == null); } - allOK = allOK && ok; }