-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.3
-
generic
-
generic
Raster.createPackedRaster(int dataType, int width, int height, int numBands,
int bitsPerBand, Point location) does not throw exception when numBands is
less than 1.
import java.awt.Point;
import java.awt.image.DataBuffer;
import java.awt.image.Raster;
class Bug_CreatePackedRaster_i5__11_13 {
public static void main(String args[]) {
try {
Raster.createPackedRaster(DataBuffer.TYPE_BYTE, 1, 2, 0, 3, new Point(1, 1));
System.out.println("FAILED: no exception when numBands is less than 1");
} catch (Exception e) {
System.out.println("PASSED: got exception when bitsPerBand < 1 - " + e);
}
}
}