You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by vh...@apache.org on 2014/02/11 19:46:54 UTC
svn commit: r1567289 - in /xmlgraphics/commons/branches/Temp_Checkstyle:
src/java/org/apache/xmlgraphics/image/
src/java/org/apache/xmlgraphics/image/codec/png/
src/java/org/apache/xmlgraphics/image/codec/tiff/
src/java/org/apache/xmlgraphics/image/ren...
Author: vhennebert
Date: Tue Feb 11 18:46:54 2014
New Revision: 1567289
URL: http://svn.apache.org/r1567289
Log:
Fix MultipleVariableDeclarations
Modified:
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java
xmlgraphics/commons/branches/Temp_Checkstyle/test/java/org/apache/xmlgraphics/util/DoubleFormatUtilTestCase.java
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java Tue Feb 11 18:46:54 2014
@@ -571,7 +571,12 @@ public final class GraphicsUtil {
int [] pixel = null;
int bands = wr.getNumBands();
float norm = 1f / 255f;
- int x0, x1, y0, y1, a, b;
+ int x0;
+ int x1;
+ int y0;
+ int y1;
+ int a;
+ int b;
float alpha;
x0 = wr.getMinX();
x1 = x0 + wr.getWidth();
@@ -599,7 +604,12 @@ public final class GraphicsUtil {
} else if (is_INT_PACK_Data(wr.getSampleModel(), true)) {
divide_INT_PACK_Data(wr);
} else {
- int x0, x1, y0, y1, a, b;
+ int x0;
+ int x1;
+ int y0;
+ int y1;
+ int a;
+ int b;
float ialpha;
int bands = wr.getNumBands();
int [] pixel = null;
@@ -702,7 +712,8 @@ public final class GraphicsUtil {
out -= bands;
}
- int b, in;
+ int b;
+ int in;
for (int y = y0; y <= y1; y++) {
pixel = srcR.getPixels(x0, y, w, 1, pixel);
in = w * (bands - 1) - 1;
@@ -729,7 +740,12 @@ public final class GraphicsUtil {
} else if (dstAlpha && dst.isAlphaPremultiplied()) {
// Src and dest have Alpha but we need to multiply it for dst.
// System.out.println("Mult Case");
- int a, b, alpha, in, fpNorm = (1 << 24) / 255, pt5 = 1 << 23;
+ int a;
+ int b;
+ int alpha;
+ int in;
+ int fpNorm = (1 << 24) / 255;
+ int pt5 = 1 << 23;
for (int y = y0; y <= y1; y++) {
pixel = srcR.getPixels(x0, y, w, 1, pixel);
in = bands * w - 1;
@@ -768,7 +784,12 @@ public final class GraphicsUtil {
} else if (dstAlpha && !dst.isAlphaPremultiplied()) {
// Src and dest have Alpha but we need to divide it out for dst.
// System.out.println("Div Case");
- int a, b, ialpha, in, fpNorm = 0x00FF0000, pt5 = 1 << 15;
+ int a;
+ int b;
+ int ialpha;
+ int in;
+ int fpNorm = 0x00FF0000;
+ int pt5 = 1 << 15;
for (int y = y0; y <= y1; y++) {
pixel = srcR.getPixels(x0, y, w, 1, pixel);
in = (bands * w) - 1;
@@ -808,7 +829,13 @@ public final class GraphicsUtil {
int [] oPix = new int[bands * w];
// Src has alpha dest does not so unpremult and store...
// System.out.println("Remove Alpha, Div Case");
- int a, b, ialpha, in, out, fpNorm = 0x00FF0000, pt5 = 1 << 15;
+ int a;
+ int b;
+ int ialpha;
+ int in;
+ int out;
+ int fpNorm = 0x00FF0000;
+ int pt5 = 1 << 15;
for (int y = y0; y <= y1; y++) {
pixel = srcR.getPixels(x0, y, w, 1, pixel);
in = (bands + 1) * w - 1;
@@ -863,7 +890,8 @@ public final class GraphicsUtil {
int dx = dR.x - sR.x;
sR = sR.intersection(src.getBounds());
dR = dR.intersection(dst.getBounds());
- int width, height;
+ int width;
+ int height;
if (dR.width < sR.width) {
width = dR.width;
} else {
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java Tue Feb 11 18:46:54 2014
@@ -1386,8 +1386,14 @@ public abstract class PNGEncodeParam imp
int bytesPerPixel) {
int [] badness = {0, 0, 0, 0, 0};
- int curr, left, up, upleft, diff;
- int pa, pb, pc;
+ int curr;
+ int left;
+ int up;
+ int upleft;
+ int diff;
+ int pa;
+ int pb;
+ int pc;
for (int i = bytesPerPixel; i < bytesPerRow + bytesPerPixel; i++) {
curr = currRow[i] & 0xff;
left = currRow[i - bytesPerPixel] & 0xff;
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java Tue Feb 11 18:46:54 2014
@@ -930,7 +930,9 @@ class PNGImage extends SimpleRenderedIma
break;
}
- int r = 0, g = 0, b = 0;
+ int r = 0;
+ int g = 0;
+ int b = 0;
if (bitDepth < 8) {
r = expandBits[bitDepth][bkgdRed];
g = expandBits[bitDepth][bkgdGreen];
@@ -1322,7 +1324,9 @@ class PNGImage extends SimpleRenderedIma
private static void decodeAverageFilter(byte[] curr, byte[] prev,
int count, int bpp) {
- int raw, priorPixel, priorRow;
+ int raw;
+ int priorPixel;
+ int priorRow;
for (int i = 0; i < bpp; i++) {
raw = curr[i] & 0xff;
@@ -1342,7 +1346,10 @@ class PNGImage extends SimpleRenderedIma
private static void decodePaethFilter(byte[] curr, byte[] prev,
int count, int bpp) {
- int raw, priorPixel, priorRow, priorRowPixel;
+ int raw;
+ int priorPixel;
+ int priorRow;
+ int priorRowPixel;
for (int i = 0; i < bpp; i++) {
raw = curr[i] & 0xff;
@@ -1366,7 +1373,8 @@ class PNGImage extends SimpleRenderedIma
private void processPixels(int process,
Raster src, WritableRaster dst,
int xOffset, int step, int y, int width) {
- int srcX, dstX;
+ int srcX;
+ int dstX;
// Create an array suitable for holding one pixel
int[] ps = src.getPixel(0, 0, (int[])null);
@@ -1650,7 +1658,8 @@ class PNGImage extends SimpleRenderedIma
}
// Decode the (sub)image row-by-row
- int srcY, dstY;
+ int srcY;
+ int dstY;
for (srcY = 0, dstY = yOffset;
srcY < passHeight;
srcY++, dstY += yStep) {
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java Tue Feb 11 18:46:54 2014
@@ -1054,7 +1054,9 @@ public class PNGRed extends AbstractRed
}
if (emitProperties) {
- int r = 0, g = 0, b = 0;
+ int r = 0;
+ int g = 0;
+ int b = 0;
if ((colorType == PNG_COLOR_PALETTE) || (bitDepth == 8)) {
r = bkgdRed;
g = bkgdGreen;
@@ -1478,7 +1480,8 @@ public class PNGRed extends AbstractRed
private static void decodePaethFilter(byte[] curr, byte[] prev,
int count, int bpp) {
- int priorPixel, priorRowPixel;
+ int priorPixel;
+ int priorRowPixel;
for (int i = 0; i < bpp; i++) {
int raw = curr[i] & 0xff;
@@ -1502,7 +1505,8 @@ public class PNGRed extends AbstractRed
private void processPixels(int process,
Raster src, WritableRaster dst,
int xOffset, int step, int y, int width) {
- int srcX, dstX;
+ int srcX;
+ int dstX;
// Create an array suitable for holding one pixel
int[] ps = src.getPixel(0, 0, (int[])null);
@@ -1788,7 +1792,8 @@ public class PNGRed extends AbstractRed
}
// Decode the (sub)image row-by-row
- int srcY, dstY;
+ int srcY;
+ int dstY;
for (srcY = 0, dstY = yOffset;
srcY < passHeight;
srcY++, dstY += yStep) {
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java Tue Feb 11 18:46:54 2014
@@ -209,7 +209,8 @@ public class TIFFDirectory implements Se
private void initialize(SeekableStream stream) throws IOException {
long nextTagOffset;
- int i, j;
+ int i;
+ int j;
IFDOffset = stream.getFilePointer();
@@ -253,7 +254,8 @@ public class TIFFDirectory implements Se
if (type == TIFFField.TIFF_ASCII) {
// Can be multiple strings
- int index = 0, prevIndex = 0;
+ int index = 0;
+ int prevIndex = 0;
List v = new ArrayList();
while (index < count) {
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java Tue Feb 11 18:46:54 2014
@@ -28,9 +28,11 @@ import org.apache.xmlgraphics.image.code
class TIFFFaxDecoder {
- private int bitPointer, bytePointer;
+ private int bitPointer;
+ private int bytePointer;
private byte[] data;
- private int w, h;
+ private int w;
+ private int h;
private int fillOrder;
// Data structures needed to store changing elements for the previous
@@ -591,8 +593,12 @@ class TIFFFaxDecoder {
public void decodeNextScanline(byte[] buffer,
int lineOffset, int bitOffset) {
- int bits = 0, code = 0, isT = 0;
- int current, entry, twoBits;
+ int bits = 0;
+ int code = 0;
+ int isT = 0;
+ int current;
+ int entry;
+ int twoBits;
boolean isWhite = true;
// Initialize starting of the changing elements array
@@ -741,9 +747,14 @@ class TIFFFaxDecoder {
int scanlineStride = (w + 7) / 8;
- int a0, a1, b1, b2;
+ int a0;
+ int a1;
+ int b1;
+ int b2;
int[] b = new int[2];
- int entry, code, bits;
+ int entry;
+ int code;
+ int bits;
boolean isWhite;
int currIndex = 0;
int[] temp;
@@ -892,8 +903,13 @@ class TIFFFaxDecoder {
int scanlineStride = (w + 7) / 8;
- int a0, a1, b1, b2;
- int entry, code, bits;
+ int a0;
+ int a1;
+ int b1;
+ int b2;
+ int entry;
+ int code;
+ int bits;
boolean isWhite;
int currIndex;
int[] temp;
@@ -1128,7 +1144,12 @@ class TIFFFaxDecoder {
// Returns run length
private int decodeWhiteCodeWord() {
- int current, entry, bits, isT, twoBits, code = -1;
+ int current;
+ int entry;
+ int bits;
+ int isT;
+ int twoBits;
+ int code = -1;
int runLength = 0;
boolean isWhite = true;
@@ -1170,7 +1191,11 @@ class TIFFFaxDecoder {
// Returns run length
private int decodeBlackCodeWord() {
- int current, entry, bits, isT, code = -1;
+ int current;
+ int entry;
+ int bits;
+ int isT;
+ int code = -1;
int runLength = 0;
boolean isWhite = false;
@@ -1313,7 +1338,9 @@ class TIFFFaxDecoder {
}
private int nextNBits(int bitsToGet) {
- byte b, next, next2next;
+ byte b;
+ byte next;
+ byte next2next;
int l = data.length - 1;
int bp = this.bytePointer;
@@ -1382,7 +1409,8 @@ class TIFFFaxDecoder {
}
private int nextLesserThan8Bits(int bitsToGet) {
- byte b, next;
+ byte b;
+ byte next;
int l = data.length - 1;
int bp = this.bytePointer;
@@ -1408,7 +1436,8 @@ class TIFFFaxDecoder {
int bitsFromNextByte = bitsToGet - bitsLeft;
int shift = bitsLeft - bitsToGet;
- int i1, i2;
+ int i1;
+ int i2;
if (shift >= 0) {
i1 = (b & table1[bitsLeft]) >>> shift;
bitPointer += bitsToGet;
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java Tue Feb 11 18:46:54 2014
@@ -83,7 +83,8 @@ public class TIFFImage extends AbstractR
SeekableStream stream;
int tileSize;
- int tilesX, tilesY;
+ int tilesX;
+ int tilesY;
long[] tileOffsets;
long[] tileByteCounts;
char[] colormap;
@@ -363,7 +364,8 @@ public class TIFFImage extends AbstractR
TIFFField efield = dir.getField(TIFFImageDecoder.TIFF_EXTRA_SAMPLES);
int extraSamples = efield == null ? 0 : (int)efield.getAsLong(0);
- int tileWidth, tileHeight;
+ int tileWidth;
+ int tileHeight;
if (dir.getField(TIFFImageDecoder.TIFF_TILE_OFFSETS) != null) {
tiled = true;
// Image is in tiled format
@@ -922,7 +924,9 @@ public class TIFFImage extends AbstractR
// Expand the palette image into an rgb image with ushort
// data type.
int cmapValue;
- int count = 0, lookup, len = colormap.length / 3;
+ int count = 0;
+ int lookup;
+ int len = colormap.length / 3;
int len2 = len * 2;
for (int i = 0; i < unitsBeforeLookup; i++) {
// Get the index into the colormap
@@ -943,7 +947,9 @@ public class TIFFImage extends AbstractR
// Expand the palette image into an rgb image with
// short data type.
int cmapValue;
- int count = 0, lookup, len = colormap.length / 3;
+ int count = 0;
+ int lookup;
+ int len = colormap.length / 3;
int len2 = len * 2;
for (int i = 0; i < unitsBeforeLookup; i++) {
// Get the index into the colormap
@@ -1070,7 +1076,9 @@ public class TIFFImage extends AbstractR
// Expand the palette image into an rgb image with ushort
// data type.
int cmapValue;
- int count = 0, lookup, len = colormap.length / 3;
+ int count = 0;
+ int lookup;
+ int len = colormap.length / 3;
int len2 = len * 2;
for (int i = 0; i < unitsBeforeLookup; i++) {
// Get the index into the colormap
@@ -1168,7 +1176,8 @@ public class TIFFImage extends AbstractR
// Unpack the 2 pixels packed into each byte.
data = new byte[bytes];
- int srcCount = 0, dstCount = 0;
+ int srcCount = 0;
+ int dstCount = 0;
for (int j = 0; j < newRect.height; j++) {
for (int i = 0; i < newRect.width / 2; i++) {
data[dstCount++] =
@@ -1185,7 +1194,8 @@ public class TIFFImage extends AbstractR
int len = colormap.length / 3;
int len2 = len * 2;
- int cmapValue, lookup;
+ int cmapValue;
+ int lookup;
int count = 0;
for (int i = 0; i < bytes; i++) {
lookup = data[i] & 0xff;
@@ -1581,7 +1591,8 @@ public class TIFFImage extends AbstractR
int shortCount) {
int j = 0;
- int firstByte, secondByte;
+ int firstByte;
+ int secondByte;
if (isBigEndian) {
@@ -1636,8 +1647,10 @@ public class TIFFImage extends AbstractR
dst = new byte[arraySize];
}
- int srcCount = 0, dstCount = 0;
- byte repeat, b;
+ int srcCount = 0;
+ int dstCount = 0;
+ byte repeat;
+ byte b;
try {
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java Tue Feb 11 18:46:54 2014
@@ -35,11 +35,15 @@ public class TIFFLZWDecoder {
byte[][] stringTable;
byte[] data = null;
byte[] uncompData;
- int tableIndex, bitsToGet = 9;
- int bytePointer, bitPointer;
+ int tableIndex;
+ int bitsToGet = 9;
+ int bytePointer;
+ int bitPointer;
int dstIndex;
- int w, h;
- int predictor, samplesPerPixel;
+ int w;
+ int h;
+ int predictor;
+ int samplesPerPixel;
int nextData = 0;
int nextBits = 0;
@@ -84,7 +88,8 @@ public class TIFFLZWDecoder {
nextData = 0;
nextBits = 0;
- int code, oldCode = 0;
+ int code;
+ int oldCode = 0;
byte[] string;
while ((code = getNextCode()) != 257
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java Tue Feb 11 18:46:54 2014
@@ -63,10 +63,14 @@ public abstract class AbstractRed implem
protected Map props;
protected SampleModel sm;
protected ColorModel cm;
- protected int tileGridXOff, tileGridYOff;
- protected int tileWidth, tileHeight;
- protected int minTileX, minTileY;
- protected int numXTiles, numYTiles;
+ protected int tileGridXOff;
+ protected int tileGridYOff;
+ protected int tileWidth;
+ protected int tileHeight;
+ protected int minTileX;
+ protected int minTileY;
+ protected int numXTiles;
+ protected int numYTiles;
/**
* void constructor. The subclass must call one of the
@@ -366,7 +370,10 @@ public abstract class AbstractRed implem
this.tileWidth = sm.getWidth();
this.tileHeight = sm.getHeight();
- int x1, y1, maxTileX, maxTileY;
+ int x1;
+ int y1;
+ int maxTileX;
+ int maxTileY;
// This computes and caches important information about the
// structure of the tile grid in general.
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java Tue Feb 11 18:46:54 2014
@@ -157,7 +157,8 @@ public class Any2sRGBRed extends Abstrac
final int height = wr.getHeight();
final int scanStride = sm.getScanlineStride();
- int end, pix;
+ int end;
+ int pix;
// For alpha premult we need to multiply all comps.
for (int y = 0; y < height; y++) {
@@ -295,7 +296,8 @@ public class Any2sRGBRed extends Abstrac
srcBICM = GraphicsUtil.coerceData(srcWr, srcCM, false);
}
- BufferedImage srcBI, dstBI;
+ BufferedImage srcBI;
+ BufferedImage dstBI;
srcBI = new BufferedImage(srcBICM,
srcWr.createWritableTranslatedChild(0, 0),
false,
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java Tue Feb 11 18:46:54 2014
@@ -157,7 +157,8 @@ public class ImageIOTIFFImageWriter exte
String value, String description) {
IIOMetadataNode field = createMetadataField(number, name);
- IIOMetadataNode arrayNode, valueNode;
+ IIOMetadataNode arrayNode;
+ IIOMetadataNode valueNode;
arrayNode = new IIOMetadataNode("TIFFShorts");
field.appendChild(arrayNode);
valueNode = new IIOMetadataNode("TIFFShort");
@@ -183,7 +184,8 @@ public class ImageIOTIFFImageWriter exte
String name, String value) {
IIOMetadataNode field = createMetadataField(number, name);
- IIOMetadataNode arrayNode, valueNode;
+ IIOMetadataNode arrayNode;
+ IIOMetadataNode valueNode;
arrayNode = new IIOMetadataNode("TIFFRationals");
field.appendChild(arrayNode);
valueNode = new IIOMetadataNode("TIFFRational");
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java Tue Feb 11 18:46:54 2014
@@ -137,7 +137,11 @@ public class Base64DecodeStream extends
}
final boolean getNextAtom() throws IOException {
- int count, a, b, c, d;
+ int count;
+ int a;
+ int b;
+ int c;
+ int d;
int off = 0;
while (off != 4) {
@@ -146,7 +150,8 @@ public class Base64DecodeStream extends
return true;
}
- int in = off, out = off;
+ int in = off;
+ int out = off;
while (in < off + count) {
if ((decode_buffer[in] != '\n')
&& (decode_buffer[in] != '\r')
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java Tue Feb 11 18:46:54 2014
@@ -119,7 +119,9 @@ public class Base64EncodeStream extends
* padding characters.
*/
void encodeAtom() throws IOException {
- byte a, b, c;
+ byte a;
+ byte b;
+ byte c;
switch (atomLen) {
case 0: return;
@@ -164,7 +166,9 @@ public class Base64EncodeStream extends
*/
void encodeFromArray(byte[] data, int offset, int len)
throws IOException {
- byte a, b, c;
+ byte a;
+ byte b;
+ byte c;
if (len == 0) {
return;
}
Modified: xmlgraphics/commons/branches/Temp_Checkstyle/test/java/org/apache/xmlgraphics/util/DoubleFormatUtilTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Checkstyle/test/java/org/apache/xmlgraphics/util/DoubleFormatUtilTestCase.java?rev=1567289&r1=1567288&r2=1567289&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Checkstyle/test/java/org/apache/xmlgraphics/util/DoubleFormatUtilTestCase.java (original)
+++ xmlgraphics/commons/branches/Temp_Checkstyle/test/java/org/apache/xmlgraphics/util/DoubleFormatUtilTestCase.java Tue Feb 11 18:46:54 2014
@@ -339,11 +339,14 @@ public class DoubleFormatUtilTestCase {
Random r = new Random();
r.setSeed(seed);
- double value, highValue, lowValue;
+ double value;
+ double highValue;
+ double lowValue;
int nbTest = 10000;
int maxDecimals = 12;
- String actual, expected;
+ String actual;
+ String expected;
for (int i = nbTest; i > 0; i--) {
int decimals = r.nextInt(maxDecimals);
int precision = decimals + 3;
@@ -373,11 +376,14 @@ public class DoubleFormatUtilTestCase {
Random r = new Random();
r.setSeed(seed);
- double value, highValue, lowValue;
+ double value;
+ double highValue;
+ double lowValue;
int nbTest = 10000;
int maxDecimals = 12;
- String actual, expected;
+ String actual;
+ String expected;
for (int i = nbTest; i > 0; i--) {
int decimals = r.nextInt(maxDecimals);
int precision = decimals + 3;
@@ -409,11 +415,14 @@ public class DoubleFormatUtilTestCase {
Random r = new Random();
r.setSeed(seed);
- double value, highValue, lowValue;
+ double value;
+ double highValue;
+ double lowValue;
int nbTest = 10000;
int maxDecimals = 12;
- String actual, expected;
+ String actual;
+ String expected;
for (int i = nbTest; i > 0; i--) {
int decimals = r.nextInt(maxDecimals);
int precision = decimals + 3;
@@ -449,7 +458,9 @@ public class DoubleFormatUtilTestCase {
Random r = new Random();
r.setSeed(seed);
- double value, highValue, lowValue;
+ double value;
+ double highValue;
+ double lowValue;
long start = System.currentTimeMillis();
int nbTest = 1000000;
int maxDecimals = 16;
@@ -563,8 +574,10 @@ public class DoubleFormatUtilTestCase {
double[] values = {0, 1, 5, 4.9999, 5.0001, 9.9999, 1234567890, 0 /* The last one is random */};
Random r = new Random();
double value;
- String expected, actual;
- int minScale, maxScale;
+ String expected;
+ String actual;
+ int minScale;
+ int maxScale;
for (int i = -330; i <= 315; i++) {
values[values.length - 1] = r.nextDouble();
double pow = Math.pow(10.0, i);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org