8051838: [Findbugs]sun.awt.image.MultiResolutionCachedImage expose internal representation
authoralexsch
Thu, 31 Jul 2014 14:28:10 +0400
changeset 26019 10a56d28f48d
parent 26018 2a797c982509
child 26020 68deef2ad1c9
8051838: [Findbugs]sun.awt.image.MultiResolutionCachedImage expose internal representation Reviewed-by: serb, pchelko
jdk/src/share/classes/sun/awt/image/MultiResolutionCachedImage.java
--- a/jdk/src/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Wed Jul 30 16:11:47 2014 +0400
+++ b/jdk/src/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Thu Jul 31 14:28:10 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;
     }