My previous patch for this method was wrong. I amended the Mauve test and committed the following (which fixes the Mauve test and a failure in the Intel test suite):

2006-07-14  David Gilbert  <[EMAIL PROTECTED]>

        * java/awt/image/MultiPixelPackedSampleModel.java
        (createSubsetSampleModel): Restored argument check, but let null
        through.

Regards,

Dave
Index: java/awt/image/MultiPixelPackedSampleModel.java
===================================================================
RCS file: 
/sources/classpath/classpath/java/awt/image/MultiPixelPackedSampleModel.java,v
retrieving revision 1.8
diff -u -r1.8 MultiPixelPackedSampleModel.java
--- java/awt/image/MultiPixelPackedSampleModel.java     14 Jul 2006 10:47:51 
-0000      1.8
+++ java/awt/image/MultiPixelPackedSampleModel.java     14 Jul 2006 11:00:02 
-0000
@@ -194,10 +194,18 @@
    * a new instance of <code>MultiPixelPackedSampleModel</code>, with the same
    * attributes as this instance.
    * 
-   * @param bands  ignored.
+   * @param bands  the bands to include in the subset (this is ignored, except
+   *     that if it is non-<code>null</code> a check is made to ensure that the
+   *     array length is equal to <code>1</code>).
+   *     
+   * @throws RasterFormatException if <code>bands</code> is not 
+   *     <code>null</code> and <code>bands.length != 1</code>.
    */
   public SampleModel createSubsetSampleModel(int[] bands)
   {
+    if (bands != null && bands.length != 1)
+      throw new RasterFormatException("MultiPixelPackedSampleModel only"
+          + " supports one band");
     return new MultiPixelPackedSampleModel(dataType, width, height, 
         numberOfBits, scanlineStride, dataBitOffset);
   }

Reply via email to