--- old/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxDecompressor.java 2018-10-01 09:57:32.430026000 +0700 +++ new/src/java.desktop/share/classes/com/sun/imageio/plugins/tiff/TIFFFaxDecompressor.java 2018-10-01 09:57:32.022026000 +0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -71,13 +71,13 @@ // Data structures needed to store changing elements for the previous // and the current scanline private int changingElemSize = 0; - private int prevChangingElems[]; - private int currChangingElems[]; + private int[] prevChangingElems; + private int[] currChangingElems; // Element at which to start search in getNextChangingElement private int lastChangingElement = 0; - private static int table1[] = { + private static int[] table1 = { 0x00, // 0 bits are left in first byte - SHOULD NOT HAPPEN 0x01, // 1 bits are left in first byte 0x03, // 2 bits are left in first byte @@ -89,7 +89,7 @@ 0xff // 8 bits are left in first byte }; - private static int table2[] = { + private static int[] table2 = { 0x00, // 0 0x80, // 1 0xc0, // 2 @@ -103,7 +103,7 @@ // Table to be used for flipping bytes when fillOrder is // BaselineTIFFTagSet.FILL_ORDER_RIGHT_TO_LEFT (2). - static byte flipTable[] = { + static byte[] flipTable = { 0, -128, 64, -64, 32, -96, 96, -32, 16, -112, 80, -48, 48, -80, 112, -16, 8, -120, 72, -56, 40, -88, 104, -24, @@ -139,7 +139,7 @@ }; // The main 10 bit white runs lookup table - private static short white[] = { + private static short[] white = { // 0 - 7 6430, 6400, 6400, 6400, 3225, 3225, 3225, 3225, // 8 - 15 @@ -399,7 +399,7 @@ }; // Additional make up codes for both White and Black runs - private static short additionalMakeup[] = { + private static short[] additionalMakeup = { 28679, 28679, 31752, (short)32777, (short)33801, (short)34825, (short)35849, (short)36873, (short)29703, (short)29703, (short)30727, (short)30727, @@ -407,7 +407,7 @@ }; // Initial black run look up table, uses the first 4 bits of a code - private static short initBlack[] = { + private static short[] initBlack = { // 0 - 7 3226, 6412, 200, 168, 38, 38, 134, 134, // 8 - 15 @@ -415,10 +415,10 @@ }; // - private static short twoBitBlack[] = {292, 260, 226, 226}; // 0 - 3 + private static short[] twoBitBlack = {292, 260, 226, 226}; // 0 - 3 // Main black run table, using the last 9 bits of possible 13 bit code - private static short black[] = { + private static short[] black = { // 0 - 7 62, 62, 30, 30, 0, 0, 0, 0, // 8 - 15 @@ -549,7 +549,7 @@ 390, 390, 390, 390, 390, 390, 390, 390, }; - private static byte twoDCodes[] = { + private static byte[] twoDCodes = { // 0 - 7 80, 88, 23, 71, 30, 30, 62, 62, // 8 - 15 @@ -853,7 +853,7 @@ int entry, code, bits, color; boolean isWhite; int currIndex = 0; - int temp[]; + int[] temp; if(data.length < 2) { throw new IIOException("Insufficient data to read initial EOL."); @@ -1029,7 +1029,7 @@ byte color; boolean isWhite; int currIndex; - int temp[]; + int[] temp; // Return values from getNextChangingElement int[] b = new int[2];