commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1545938 - in /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging: common/ formats/tiff/ formats/tiff/datareaders/ formats/tiff/fieldtypes/ formats/tiff/write/ palette/ util/
Date Wed, 27 Nov 2013 06:42:16 GMT
Author: ebourg
Date: Wed Nov 27 06:42:15 2013
New Revision: 1545938

URL: http://svn.apache.org/r1545938
Log:
Missing spaces

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.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/datareaders/DataReaderTiled.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldType.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLong.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.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/BasicCParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
Wed Nov 27 06:42:15 2013
@@ -125,7 +125,7 @@ public class BasicCParser {
                         seenFirstComment = true;
                     } else {
                         if (!seenFirstComment) {
-                            firstComment.append((char)c);
+                            firstComment.append((char) c);
                         }
                     }
                 } else {

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffField.java
Wed Nov 27 06:42:15 2013
@@ -55,7 +55,7 @@ public class TiffField {
 
     public TiffField(final int tag, final int directoryType, final FieldType fieldType,
             final long count, final long offset, final byte[] value,
-            final ByteOrder byteOrder, final int sortHint){
+            final ByteOrder byteOrder, final int sortHint) {
 
         this.tag = tag;
         this.directoryType = directoryType;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageData.java
Wed Nov 27 06:42:15 2013
@@ -69,7 +69,7 @@ public abstract class TiffImageData {
          * the last column of tiles may extend beyond the image width.
          * @return an integer value greater than zero
          */
-        public int getTileWidth(){
+        public int getTileWidth() {
             return tileWidth;
         }
         
@@ -79,7 +79,7 @@ public abstract class TiffImageData {
          * the last row of tiles may extend beyond the image height.
          * @return an integer value greater than zero
          */
-        public int getTileHeight(){
+        public int getTileHeight() {
             return tileLength;
         }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
Wed Nov 27 06:42:15 2013
@@ -511,7 +511,7 @@ public class TiffImageParser extends Ima
         if (obj instanceof Integer) {
             return (Integer) obj;
         }
-        throw new ImageReadException("Non-Integer parameter "+key);
+        throw new ImageReadException("Non-Integer parameter " + key);
     }
     
     private Rectangle checkForSubImage(

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=1545938&r1=1545937&r2=1545938&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
Wed Nov 27 06:42:15 2013
@@ -249,7 +249,7 @@ public final class DataReaderStrips exte
         // in the full image (the source image) that will be processed.
  
         final int y0 = strip0 * rowsPerStrip;
-        final int yLimit = subImage.y-y0+subImage.height;
+        final int yLimit = subImage.y - y0 + subImage.height;
 
 
         // TO DO: we can probably save some processing by using yLimit instead

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java
Wed Nov 27 06:42:15 2013
@@ -209,15 +209,15 @@ public final class DataReaderTiled exten
 
         final int nColumnsOfTiles = (width + tileWidth - 1) / tileWidth;
 
-        final int x0 = col0*tileWidth;
-        final int y0 = row0*tileLength;
+        final int x0 = col0 * tileWidth;
+        final int y0 = row0 * tileLength;
         
         final ImageBuilder workingBuilder =
                 new ImageBuilder(workingWidth, workingHeight, false);
         
         for (int iRow = row0; iRow <= row1; iRow++) {
             for (int iCol = col0; iCol <= col1; iCol++) {
-                final int tile = iRow * nColumnsOfTiles+iCol;
+                final int tile = iRow * nColumnsOfTiles + iCol;
                 final byte[] compressed = imageData.tiles[tile].getData();
                 final byte[] decompressed = decompress(compressed, compression,
                         bytesPerTile, tileWidth, tileLength);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldType.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldType.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldType.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldType.java
Wed Nov 27 06:42:15 2013
@@ -77,7 +77,7 @@ public abstract class FieldType {
     
     public static final List<FieldType> LONG_OR_IFD =
             Collections.unmodifiableList(Arrays.asList(
-                    (FieldType)LONG, IFD));
+                    (FieldType) LONG, IFD));
     
     public static final List<FieldType> ASCII_OR_RATIONAL =
             Collections.unmodifiableList(Arrays.asList(

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLong.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLong.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLong.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLong.java
Wed Nov 27 06:42:15 2013
@@ -40,7 +40,7 @@ public class FieldTypeLong extends Field
     @Override
     public byte[] writeData(final Object o, final ByteOrder byteOrder) throws ImageWriteException
{
         if (o instanceof Integer) {
-            return ByteConversions.toBytes((Integer)o, byteOrder);
+            return ByteConversions.toBytes((Integer) o, byteOrder);
         } else if (o instanceof int[]) {
             final int[] numbers = (int[]) o;
             return ByteConversions.toBytes(numbers, byteOrder);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java
Wed Nov 27 06:42:15 2013
@@ -63,7 +63,7 @@ public class TiffImageWriterLossless ext
         this.exifBytes = exifBytes;
     }
 
-    private List<TiffElement> analyzeOldTiff(final Map<Integer,TiffOutputField>
frozenFields) throws ImageWriteException,
+    private List<TiffElement> analyzeOldTiff(final Map<Integer, TiffOutputField>
frozenFields) throws ImageWriteException,
             IOException {
         try {
             final ByteSource byteSource = new ByteSourceArray(exifBytes);
@@ -149,7 +149,7 @@ public class TiffImageWriterLossless ext
             throws IOException, ImageWriteException {
         // There are some fields whose address in the file must not change,
         // unless of course their value is changed. 
-        final Map<Integer,TiffOutputField> frozenFields = new HashMap<Integer,TiffOutputField>();
+        final Map<Integer, TiffOutputField> frozenFields = new HashMap<Integer,
TiffOutputField>();
         final TiffOutputField makerNoteField = outputSet.findField(EXIF_TAG_MAKER_NOTE);
         if (makerNoteField != null && makerNoteField.getSeperateValue() != null)
{
             frozenFields.put(EXIF_TAG_MAKER_NOTE.tag, makerNoteField);
@@ -168,8 +168,8 @@ public class TiffImageWriterLossless ext
                 return;
             }
         }
-        final Map<Long,TiffOutputField> frozenFieldOffsets = new HashMap<Long, TiffOutputField>();
-        for (final Map.Entry<Integer,TiffOutputField> entry : frozenFields.entrySet())
{
+        final Map<Long, TiffOutputField> frozenFieldOffsets = new HashMap<Long,
TiffOutputField>();
+        for (final Map.Entry<Integer, TiffOutputField> entry : frozenFields.entrySet())
{
             final TiffOutputField frozenField = entry.getValue();
             if (frozenField.getSeperateValue().getOffset() != TiffOutputItem.UNDEFINED_VALUE)
{
                 frozenFieldOffsets.put(frozenField.getSeperateValue().getOffset(), frozenField);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java?rev=1545938&r1=1545937&r2=1545938&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/palette/Dithering.java
Wed Nov 27 06:42:15 2013
@@ -31,7 +31,8 @@ public final class Dithering {
      * Changes the given image to only use colors from the given palette,
      * applying Floyd-Steinberg dithering in the process. Ensure that
      * your alpha values in the image and in the palette are consistent.
-     * @param image the image to change
+     *
+     * @param image   the image to change
      * @param palette the palette to use
      * @throws ImageWriteException
      */
@@ -84,12 +85,12 @@ public final class Dithering {
         int r = (argb >> 16) & 0xff;
         int g = (argb >> 8) & 0xff;
         int b = argb & 0xff;
-        
-        a += errA*mul/16;
-        r += errR*mul/16;
-        g += errG*mul/16;
-        b += errB*mul/16;
-        
+
+        a += errA * mul / 16;
+        r += errR * mul / 16;
+        g += errG * mul / 16;
+        b += errB * mul / 16;
+
         if (a < 0) {
             a = 0;
         } else if (a > 0xff) {

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=1545938&r1=1545937&r2=1545938&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
Wed Nov 27 06:42:15 2013
@@ -115,7 +115,7 @@ public final class Debug {
         debug(getDebug(message, map));
     }
 
-    private static String getDebug(final String message, final Map<?,?> map) {
+    private static String getDebug(final String message, final Map<?, ?> map) {
         final StringBuilder result = new StringBuilder();
 
         if (map == null) {



Mime
View raw message