changeset 9890:9fe29a982ec6

8051838: [Findbugs] sun.awt.image.MultiResolutionCachedImage expose internal representation Reviewed-by: serb, pchelko
author alexsch
date Thu, 07 Aug 2014 12:54:35 +0400
parents 86d8ddab2310
children 725736a9e6d8
files src/share/classes/sun/awt/image/MultiResolutionCachedImage.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Fri Aug 01 19:44:52 2014 +0100
+++ b/src/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Thu Aug 07 12:54:35 2014 +0400
@@ -53,7 +53,7 @@
             Dimension2D[] sizes, BiFunction<Integer, Integer, Image> mapper) {
         this.baseImageWidth = baseImageWidth;
         this.baseImageHeight = baseImageHeight;
-        this.sizes = sizes;
+        this.sizes = (sizes == null) ? null : Arrays.copyOf(sizes, sizes.length);
         this.mapper = mapper;
     }