< prev index next >

src/java.desktop/share/classes/sun/awt/image/ShortBandedRaster.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -132,13 +132,13 @@
         this.maxY = minY + height;
 
         if (sampleModel instanceof BandedSampleModel) {
             BandedSampleModel bsm = (BandedSampleModel)sampleModel;
             this.scanlineStride = bsm.getScanlineStride();
-            int bankIndices[] = bsm.getBankIndices();
-            int bandOffsets[] = bsm.getBandOffsets();
-            int dOffsets[] = dataBuffer.getOffsets();
+            int[] bankIndices = bsm.getBankIndices();
+            int[] bandOffsets = bsm.getBandOffsets();
+            int[] dOffsets = dataBuffer.getOffsets();
             dataOffsets = new int[bankIndices.length];
             data = new short[bankIndices.length][];
             int xOffset = aRegion.x - origin.x;
             int yOffset = aRegion.y - origin.y;
             for (int i = 0; i < bankIndices.length; i++) {

@@ -223,11 +223,11 @@
         if ((x < this.minX) || (y < this.minY) ||
             (x >= this.maxX) || (y >= this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
-        short outData[];
+        short[] outData;
         if (obj == null) {
             outData = new short[numDataElements];
         } else {
             outData = (short[])obj;
         }

@@ -269,11 +269,11 @@
         if ((x < this.minX) || (y < this.minY) ||
             (x + w > this.maxX) || (y + h > this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
-        short outData[];
+        short[] outData;
         if (obj == null) {
             outData = new short[numDataElements*w*h];
         } else {
             outData = (short[])obj;
         }

@@ -409,11 +409,11 @@
         if ((x < this.minX) || (y < this.minY) ||
             (x >= this.maxX) || (y >= this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
-        short inData[] = (short[])obj;
+        short[] inData = (short[])obj;
         int off = (y-minY)*scanlineStride + (x-minX);
         for (int i = 0; i < numDataElements; i++) {
             data[i][dataOffsets[i] + off] = inData[i];
         }
 

@@ -506,11 +506,11 @@
         if ((x < this.minX) || (y < this.minY) ||
             (x + w > this.maxX) || (y + h > this.maxY)) {
             throw new ArrayIndexOutOfBoundsException
                 ("Coordinate out of bounds!");
         }
-        short inData[] = (short[])obj;
+        short[] inData = (short[])obj;
         int yoff = (y-minY)*scanlineStride + (x-minX);
 
         for (int c = 0; c < numDataElements; c++) {
             int off = c;
             short[] bank = data[c];

@@ -636,11 +636,11 @@
      *            if the specified bounding box is outside of the parent Raster.
      */
     public WritableRaster createWritableChild(int x, int y,
                                               int width, int height,
                                               int x0, int y0,
-                                              int bandList[]) {
+                                              int[] bandList) {
 
         if (x < this.minX) {
             throw new RasterFormatException("x lies outside raster");
         }
         if (y < this.minY) {

@@ -692,11 +692,11 @@
      *            if the specified bounding box is outside of the parent raster.
      */
     public Raster createChild (int x, int y,
                                int width, int height,
                                int x0, int y0,
-                               int bandList[]) {
+                               int[] bandList) {
         return createWritableChild(x, y, width, height, x0, y0, bandList);
     }
 
     /**
      * Creates a Raster with the same layout but using a different
< prev index next >