Index: trunk/modules/awt/src/main/java/common/java/awt/image/Raster.java =================================================================== --- trunk/modules/awt/src/main/java/common/java/awt/image/Raster.java (revision 494809) +++ trunk/modules/awt/src/main/java/common/java/awt/image/Raster.java (working copy) @@ -534,6 +534,11 @@ throw new NullPointerException(Messages.getString("awt.27F")); //$NON-NLS-1$ } + if (sm.dataType != db.dataType) { + // awt.27G=SampleModel and DataBuffer have different data types + throw new RasterFormatException(Messages.getString("awt.27G")); //$NON-NLS-1$ + } + if (location == null) { location = new Point(0, 0); } Index: trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties =================================================================== --- trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties (revision 494809) +++ trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties (working copy) @@ -463,6 +463,7 @@ awt.27D=bitsPerBand or bands is not greater than zero awt.27E=The product of bitsPerBand and bands is greater than the number of bits held by dataType awt.27F=SampleModel or DataBuffer is null +awt.27G=SampleModel and DataBuffer have different data types awt.280=SampleModel is null awt.281=sampleModel, dataBuffer, aRegion or sampleModelTranslate is null awt.282=aRegion has width or height less than or equal to zero