[OpenJDK 2D-Dev] [PATCH] 8036604 : Typo in BufferedBufImgOps.java in the exception message

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Jun 19 03:08:07 UTC 2020


Looks fine, I'll sponsor the fix.

On 6/13/20 12:45 pm, Andrey Turbanov wrote:
> Hello.
> I would like to contribute a patch to fix:
> https://bugs.openjdk.java.net/browse/JDK-8036604
> Please review and sponsor.
> 
> 
> Andrey Turbanov
> 
> 
> diff --git a/src/java.desktop/share/classes/java/awt/image/RescaleOp.java
> b/src/java.desktop/share/classes/java/awt/image/RescaleOp.java
> index ba9307c7c06..d93410f9e0c 100644
> --- a/src/java.desktop/share/classes/java/awt/image/RescaleOp.java
> +++ b/src/java.desktop/share/classes/java/awt/image/RescaleOp.java
> @@ -1,5 +1,5 @@
>   /*
> - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
>    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>    *
>    * This code is free software; you can redistribute it and/or modify it
> @@ -25,11 +25,9 @@
> 
>   package java.awt.image;
> 
> -import java.awt.color.ColorSpace;
>   import java.awt.geom.Rectangle2D;
>   import java.awt.AlphaComposite;
>   import java.awt.Graphics2D;
> -import java.awt.Rectangle;
>   import java.awt.geom.Point2D;
>   import java.awt.RenderingHints;
>   import sun.awt.image.ImagingLib;
> @@ -379,7 +377,7 @@ public class RescaleOp implements BufferedImageOp,
> RasterOp {
>           {
>               throw new IllegalArgumentException("Number of scaling constants "+
>                                                  "does not equal the number of"+
> -                                               " of color or color/alpha "+
> +                                               " color or color/alpha"+
>                                                  " components");
>           }
> 
> @@ -512,7 +510,7 @@ public class RescaleOp implements BufferedImageOp,
> RasterOp {
>           if (sCheck && scaleConst != 1 && scaleConst != src.getNumBands()) {
>               throw new IllegalArgumentException("Number of scaling constants "+
>                                                  "does not equal the number of"+
> -                                               " of bands in the src raster");
> +                                               " bands in the src raster");
>           }
> 
>           //
> diff --git a/src/java.desktop/share/classes/sun/java2d/pipe/BufferedBufImgOps.java
> b/src/java.desktop/share/classes/sun/java2d/pipe/BufferedBufImgOps.java
> index 0a9cde7b181..d7dba199c76 100644
> --- a/src/java.desktop/share/classes/sun/java2d/pipe/BufferedBufImgOps.java
> +++ b/src/java.desktop/share/classes/sun/java2d/pipe/BufferedBufImgOps.java
> @@ -1,5 +1,5 @@
>   /*
> - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
>    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>    *
>    * This code is free software; you can redistribute it and/or modify it
> @@ -26,10 +26,8 @@
>   package sun.java2d.pipe;
> 
>   import java.awt.color.ColorSpace;
> -import java.awt.image.AffineTransformOp;
>   import java.awt.image.BufferedImage;
>   import java.awt.image.BufferedImageOp;
> -import java.awt.image.BufferedImageOp;
>   import java.awt.image.ByteLookupTable;
>   import java.awt.image.ColorModel;
>   import java.awt.image.ConvolveOp;
> @@ -40,7 +38,6 @@ import java.awt.image.LookupTable;
>   import java.awt.image.RescaleOp;
>   import java.awt.image.ShortLookupTable;
>   import sun.java2d.SurfaceData;
> -import sun.java2d.loops.CompositeType;
>   import static sun.java2d.pipe.BufferedOpCodes.*;
> 
>   public class BufferedBufImgOps {
> @@ -137,7 +134,7 @@ public class BufferedBufImgOps {
>           {
>               throw new IllegalArgumentException("Number of scaling constants "+
>                                                  "does not equal the number of"+
> -                                               " of color or color/alpha "+
> +                                               " color or color/alpha"+
>                                                  " components");
>           }
> 


-- 
Best regards, Sergey.


More information about the 2d-dev mailing list