commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damjan Jovanovic <dam...@apache.org>
Subject Re: svn commit: r1546303 - in /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging: common/ common/bytesource/ common/itu_t4/ common/mylzw/ formats/bmp/pixelparsers/ formats/jpeg/decoder/ formats/pcx/ formats/png/ formats/tiff/ formats/ti...
Date Thu, 28 Nov 2013 07:45:41 GMT
Why? I've heard initializing fields, even to their defaults, is a good
practice and makes code clearer.

Damjan

On Thu, Nov 28, 2013 at 9:43 AM,  <ebourg@apache.org> wrote:
> Author: ebourg
> Date: Thu Nov 28 07:43:15 2013
> New Revision: 1546303
>
> URL: http://svn.apache.org/r1546303
> Log:
> Removed field initializations to the default values
>
> Modified:
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/FastByteArrayOutputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitArrayOutputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitInputStreamFlexible.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserBitFields.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngCrc.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/BitInputStream.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorCount.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorGroup.java
>     commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryFileParser.java
Thu Nov 28 07:43:15 2013
> @@ -24,7 +24,7 @@ import java.nio.charset.Charset;
>  public class BinaryFileParser {
>      // default byte order for Java, many file formats.
>      private ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
> -    private boolean debug = false;
> +    private boolean debug;
>
>      public BinaryFileParser(final ByteOrder byteOrder) {
>          this.byteOrder = byteOrder;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BinaryOutputStream.java
Thu Nov 28 07:43:15 2013
> @@ -24,8 +24,8 @@ public class BinaryOutputStream extends
>      private final OutputStream os;
>      // default byte order for Java, many file formats.
>      private ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
> -    private boolean debug = false;
> -    private int count = 0;
> +    private boolean debug;
> +    private int count;
>
>      public final void setDebug(final boolean b) {
>          debug = b;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/FastByteArrayOutputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/FastByteArrayOutputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/FastByteArrayOutputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/FastByteArrayOutputStream.java
Thu Nov 28 07:43:15 2013
> @@ -25,7 +25,7 @@ import java.io.OutputStream;
>   */
>  class FastByteArrayOutputStream extends OutputStream {
>      private final byte[] bytes;
> -    private int count = 0;
> +    private int count;
>
>      public FastByteArrayOutputStream(final int length) {
>          bytes = new byte[length];
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java
Thu Nov 28 07:43:15 2013
> @@ -25,9 +25,9 @@ import org.apache.commons.imaging.common
>
>  public class ByteSourceInputStream extends ByteSource {
>      private final InputStream is;
> -    private CacheBlock cacheHead = null;
> +    private CacheBlock cacheHead;
>      private static final int BLOCK_SIZE = 1024;
> -    private byte[] readBuffer = null;
> +    private byte[] readBuffer;
>      private long streamLength = -1;
>
>      public ByteSourceInputStream(final InputStream is, final String filename) {
> @@ -37,8 +37,8 @@ public class ByteSourceInputStream exten
>
>      private class CacheBlock {
>          public final byte[] bytes;
> -        private CacheBlock next = null;
> -        private boolean triedNext = false;
> +        private CacheBlock next;
> +        private boolean triedNext;
>
>          public CacheBlock(final byte[] bytes) {
>              this.bytes = bytes;
> @@ -87,9 +87,9 @@ public class ByteSourceInputStream exten
>      }
>
>      private class CacheReadingInputStream extends InputStream {
> -        private CacheBlock block = null;
> -        private boolean readFirst = false;
> -        private int blockIndex = 0;
> +        private CacheBlock block;
> +        private boolean readFirst;
> +        private int blockIndex;
>
>          @Override
>          public int read() throws IOException {
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitArrayOutputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitArrayOutputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitArrayOutputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitArrayOutputStream.java
Thu Nov 28 07:43:15 2013
> @@ -24,8 +24,8 @@ import java.io.OutputStream;
>   */
>  class BitArrayOutputStream extends OutputStream {
>      private byte[] buffer;
> -    private int bytesWritten = 0;
> -    private int cache = 0;
> +    private int bytesWritten;
> +    private int cache;
>      private int cacheMask = 0x80;
>
>      public BitArrayOutputStream() {
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitInputStreamFlexible.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitInputStreamFlexible.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitInputStreamFlexible.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/itu_t4/BitInputStreamFlexible.java
Thu Nov 28 07:43:15 2013
> @@ -29,8 +29,8 @@ class BitInputStreamFlexible extends Inp
>      // samples size<8 - shuoldn't that effect their order within byte?
>      private final InputStream is;
>      private int cache;
> -    private int cacheBitsRemaining = 0;
> -    private long bytesRead = 0;
> +    private int cacheBitsRemaining;
> +    private long bytesRead;
>
>      public BitInputStreamFlexible(final InputStream is) {
>          this.is = is;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitInputStream.java
Thu Nov 28 07:43:15 2013
> @@ -23,10 +23,10 @@ import java.nio.ByteOrder;
>  public class MyBitInputStream extends InputStream {
>      private final InputStream is;
>      private final ByteOrder byteOrder;
> -    private boolean tiffLZWMode = false;
> -    private long bytesRead = 0;
> -    private int bitsInCache = 0;
> -    private int bitCache = 0;
> +    private boolean tiffLZWMode;
> +    private long bytesRead;
> +    private int bitsInCache;
> +    private int bitCache;
>
>      public MyBitInputStream(final InputStream is, final ByteOrder byteOrder) {
>          this.byteOrder = byteOrder;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyBitOutputStream.java
Thu Nov 28 07:43:15 2013
> @@ -23,9 +23,9 @@ import java.nio.ByteOrder;
>  public class MyBitOutputStream extends OutputStream {
>      private final OutputStream os;
>      private final ByteOrder byteOrder;
> -    private int bitsInCache = 0;
> -    private int bitCache = 0;
> -    private int bytesWritten = 0;
> +    private int bitsInCache;
> +    private int bitCache;
> +    private int bytesWritten;
>
>      public MyBitOutputStream(final OutputStream os, final ByteOrder byteOrder) {
>          this.byteOrder = byteOrder;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java
Thu Nov 28 07:43:15 2013
> @@ -32,8 +32,8 @@ public final class MyLzwDecompressor {
>      private final Listener listener;
>      private final int clearCode;
>      private final int eoiCode;
> -    private int written = 0;
> -    private boolean tiffLZWMode = false;
> +    private int written;
> +    private boolean tiffLZWMode;
>
>      public interface Listener {
>          void code(int code);
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserBitFields.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserBitFields.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserBitFields.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/pixelparsers/PixelParserBitFields.java
Thu Nov 28 07:43:15 2013
> @@ -36,7 +36,7 @@ public class PixelParserBitFields extend
>      private final int blueMask;
>      private final int alphaMask;
>
> -    private int bytecount = 0;
> +    private int bytecount;
>
>      public PixelParserBitFields(final BmpHeaderInfo bhi, final byte[] colorTable, final
byte[] imageData) {
>          super(bhi, colorTable, imageData);
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
Thu Nov 28 07:43:15 2013
> @@ -54,9 +54,9 @@ public class JpegDecoder extends BinaryF
>      private SofnSegment sofnSegment;
>      private SosSegment sosSegment;
>      private final float[][] scaledQuantizationTables = new float[4][];
> -    private BufferedImage image = null;
> -    private ImageReadException imageReadException = null;
> -    private IOException ioException = null;
> +    private BufferedImage image;
> +    private ImageReadException imageReadException;
> +    private IOException ioException;
>      private final int[] zz = new int[64];
>      private final int[] blockInt = new int[64];
>      private final float[] block = new float[64];
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java
Thu Nov 28 07:43:15 2013
> @@ -24,7 +24,7 @@ import org.apache.commons.imaging.format
>  class JpegInputStream {
>      // Figure F.18, F.2.2.5, page 111 of ITU-T T.81
>      private final InputStream is;
> -    private int cnt = 0;
> +    private int cnt;
>      private int b;
>
>      public JpegInputStream(final InputStream is) {
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pcx/PcxWriter.java
Thu Nov 28 07:43:15 2013
> @@ -33,7 +33,7 @@ import org.apache.commons.imaging.palett
>  class PcxWriter {
>      private int encoding;
>      private int bitDepth = -1;
> -    private PixelDensity pixelDensity = null;
> +    private PixelDensity pixelDensity;
>
>      public PcxWriter(Map<String, Object> params) throws ImageWriteException {
>          // make copy of params; we'll clear keys as we consume them.
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngCrc.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngCrc.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngCrc.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngCrc.java
Thu Nov 28 07:43:15 2013
> @@ -22,7 +22,7 @@ class PngCrc {
>      private final long[] crc_table = new long[256];
>
>      /* Flag: has the table been computed? Initially false. */
> -    private boolean crc_table_computed = false;
> +    private boolean crc_table_computed;
>
>      /* Make the table for a fast CRC. */
>      private void make_crc_table() {
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
Thu Nov 28 07:43:15 2013
> @@ -51,8 +51,8 @@ public class TiffDirectory extends TiffE
>      public final int type;
>      public final List<TiffField> entries;
>      public final long nextDirectoryOffset;
> -    private TiffImageData tiffImageData = null;
> -    private JpegImageData jpegImageData = null;
> +    private TiffImageData tiffImageData;
> +    private JpegImageData jpegImageData;
>
>      public TiffDirectory(final int type, final List<TiffField> entries, final
long offset,
>              final long nextDirectoryOffset) {
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
Thu Nov 28 07:43:15 2013
> @@ -300,7 +300,7 @@ public class TiffReader extends BinaryFi
>      }
>
>      private static class Collector implements Listener {
> -        private TiffHeader tiffHeader = null;
> +        private TiffHeader tiffHeader;
>          private final List<TiffDirectory> directories = new ArrayList<TiffDirectory>();
>          private final List<TiffField> fields = new ArrayList<TiffField>();
>          private final boolean readThumbnails;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/BitInputStream.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/BitInputStream.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/BitInputStream.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/BitInputStream.java
Thu Nov 28 07:43:15 2013
> @@ -29,8 +29,8 @@ class BitInputStream extends InputStream
>      private final InputStream is;
>      private final ByteOrder byteOrder;
>      private int cache;
> -    private int cacheBitsRemaining = 0;
> -    private long bytesRead = 0;
> +    private int cacheBitsRemaining;
> +    private long bytesRead;
>
>      public BitInputStream(final InputStream is, final ByteOrder byteOrder) {
>          this.is = is;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java
Thu Nov 28 07:43:15 2013
> @@ -35,7 +35,8 @@ public final class DataReaderStrips exte
>      private final int compression;
>      private final int rowsPerStrip;
>      private final ByteOrder byteOrder;
> -    private int x = 0, y = 0;
> +    private int x;
> +    private int y;
>      private final TiffImageData.Strips imageData;
>
>      public DataReaderStrips(final TiffDirectory directory,
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java
Thu Nov 28 07:43:15 2013
> @@ -61,7 +61,7 @@ public final class TiffOutputDirectory e
>      public final int type;
>      private final List<TiffOutputField> fields = new ArrayList<TiffOutputField>();
>      private final ByteOrder byteOrder;
> -    private TiffOutputDirectory nextDirectory = null;
> +    private TiffOutputDirectory nextDirectory;
>      public static final Comparator<TiffOutputDirectory> COMPARATOR = new Comparator<TiffOutputDirectory>()
{
>          public int compare(final TiffOutputDirectory o1, final TiffOutputDirectory o2)
{
>              if (o1.type < o2.type) {
> @@ -73,8 +73,8 @@ public final class TiffOutputDirectory e
>              }
>          }
>      };
> -    private JpegImageData jpegImageData = null;
> -    private TiffImageData tiffImageData = null;
> +    private JpegImageData jpegImageData;
> +    private TiffImageData tiffImageData;
>
>      public void setNextDirectory(final TiffOutputDirectory nextDirectory) {
>          this.nextDirectory = nextDirectory;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
Thu Nov 28 07:43:15 2013
> @@ -57,7 +57,7 @@ import static org.apache.commons.imaging
>  public class XpmImageParser extends ImageParser {
>      private static final String DEFAULT_EXTENSION = ".xpm";
>      private static final String[] ACCEPTED_EXTENSIONS = { ".xpm", };
> -    private static Map<String, Integer> colorNames = null;
> +    private static Map<String, Integer> colorNames;
>      private static final char[] WRITE_PALETTE = { ' ', '.', 'X', 'o', 'O', '+',
>          '@', '#', '$', '%', '&', '*', '=', '-', ';', ':', '>', ',', '<',
>          '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'q', 'w', 'e',
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorCount.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorCount.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorCount.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorCount.java
Thu Nov 28 07:43:15 2013
> @@ -18,8 +18,11 @@ package org.apache.commons.imaging.palet
>
>  class ColorCount {
>      public final int argb;
> -    public int count = 0;
> -    public final int alpha, red, green, blue;
> +    public int count;
> +    public final int alpha;
> +    public final int red;
> +    public final int green;
> +    public final int blue;
>
>      public ColorCount(final int argb) {
>          this.argb = argb;
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorGroup.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorGroup.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorGroup.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/ColorGroup.java
Thu Nov 28 07:43:15 2013
> @@ -22,7 +22,7 @@ import org.apache.commons.imaging.ImageW
>
>  class ColorGroup {
>      // public final ColorGroup parent;
> -    public ColorGroupCut cut = null;
> +    public ColorGroupCut cut;
>      // public final List children = new ArrayList();
>      public int paletteIndex = -1;
>
>
> Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java
> URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java?rev=1546303&r1=1546302&r2=1546303&view=diff
> ==============================================================================
> --- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java
(original)
> +++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/util/Debug.java
Thu Nov 28 07:43:15 2013
> @@ -32,7 +32,7 @@ public final class Debug {
>      private static final boolean DEBUG = false;
>      // public static String newline = System.getProperty("line.separator");
>      private static final String NEWLINE = "\r\n";
> -    private static long counter = 0;
> +    private static long counter;
>
>      public static void debug(final String message) {
>          if (DEBUG) {
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message