6736178: java.awt.image.SampleModel constructor unexpectedly throws IllegalArgumentException
Reviewed-by: jgodinez, prr
--- a/jdk/src/share/classes/java/awt/image/SampleModel.java Fri Dec 17 09:39:54 2010 -0800
+++ b/jdk/src/share/classes/java/awt/image/SampleModel.java Mon Dec 20 10:38:55 2010 +0300
@@ -121,7 +121,7 @@
*/
public SampleModel(int dataType, int w, int h, int numBands)
{
- float size = (float)w*h;
+ long size = (long)w * h;
if (w <= 0 || h <= 0) {
throw new IllegalArgumentException("Width ("+w+") and height ("+
h+") must be > 0");