Index: awt/src/main/java/common/java/awt/image/Raster.java =================================================================== --- awt/src/main/java/common/java/awt/image/Raster.java (revision 485572) +++ awt/src/main/java/common/java/awt/image/Raster.java (working copy) @@ -343,11 +343,6 @@ throw new RasterFormatException(Messages.getString("awt.276")); //$NON-NLS-1$ } - if (bandMasks == null) { - // awt.27C=bandMasks is null - throw new RasterFormatException(Messages.getString("awt.27C")); //$NON-NLS-1$ - } - if (dataBuffer == null) { // awt.278=dataBuffer is null throw new NullPointerException(Messages.getString("awt.278")); //$NON-NLS-1$ @@ -482,6 +477,13 @@ public static WritableRaster createPackedRaster(int dataType, int w, int h, int bandMasks[], Point location) { + + if (dataType != DataBuffer.TYPE_BYTE + && dataType != DataBuffer.TYPE_USHORT + && dataType != DataBuffer.TYPE_INT) { + // awt.230=dataType is not one of the supported data types + throw new IllegalArgumentException(Messages.getString("awt.230")); //$NON-NLS-1$ + } if (w <= 0 || h <= 0) { // awt.22E=w or h is less than or equal to zero @@ -498,18 +500,6 @@ throw new RasterFormatException(Messages.getString("awt.276")); //$NON-NLS-1$ } - if (bandMasks == null) { - // awt.27C=bandMasks is null - throw new RasterFormatException(Messages.getString("awt.27C")); //$NON-NLS-1$ - } - - if (dataType != DataBuffer.TYPE_BYTE - && dataType != DataBuffer.TYPE_USHORT - && dataType != DataBuffer.TYPE_INT) { - // awt.230=dataType is not one of the supported data types - throw new IllegalArgumentException(Messages.getString("awt.230")); //$NON-NLS-1$ - } - DataBuffer data = null; switch (dataType) {