commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1212460 - in /commons/proper/sanselan/trunk/src: main/java/org/apache/sanselan/common/ main/java/org/apache/sanselan/formats/tiff/ main/java/org/apache/sanselan/formats/tiff/constants/ main/java/org/apache/sanselan/icc/ test/java/org/apach...
Date Fri, 09 Dec 2011 14:54:43 GMT
Author: sebb
Date: Fri Dec  9 14:54:42 2011
New Revision: 1212460

URL: http://svn.apache.org/viewvc?rev=1212460&view=rev
Log:
Fix up "Empty control flow statement" warnings

Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/BasicCParser.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/PackBits.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/icc/IccProfileParser.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/ExifRewriteTest.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/MakerNoteFieldTest.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/TextFieldTest.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/xmp/XmpUpdateTest.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/BasicCParser.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/BasicCParser.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/BasicCParser.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/BasicCParser.java
Fri Dec  9 14:54:42 2011
@@ -96,7 +96,7 @@ public class BasicCParser
                     return token.toString();
                 }
                 else if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
-                    ;
+                { /* do nothing */ }
                 else
                     throw new ImageReadException("Unhandled/invalid character '" +
                             ((char)c) + "' found in XPM file");

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/PackBits.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/PackBits.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/PackBits.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/common/PackBits.java Fri
Dec  9 14:54:42 2011
@@ -106,7 +106,7 @@ public class PackBits
         int i;
 
         for (i = start + 1; (i < bytes.length) && (bytes[i] == b); i++)
-            ;
+        { /* do nothing */ }
 
         return i - start;
     }

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/TiffReader.java
Fri Dec  9 14:54:42 2011
@@ -250,7 +250,7 @@ public class TiffReader extends BinaryFi
                     if (entry.tag == TiffConstants.EXIF_TAG_EXIF_OFFSET.tag
                             || entry.tag == TiffConstants.EXIF_TAG_GPSINFO.tag
                             || entry.tag == TiffConstants.EXIF_TAG_INTEROP_OFFSET.tag)
-                        ;
+                    { /* do nothing */ }
                     else
                         continue;
 

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/tiff/constants/TagInfo.java
Fri Dec  9 14:54:42 2011
@@ -344,9 +344,9 @@ public class TagInfo implements TiffDire
             if (entry.type == FIELD_TYPE_ASCII.type)
                 return FIELD_TYPE_ASCII.getSimpleValue(entry);
             else if (entry.type == FIELD_TYPE_UNDEFINED.type)
-                ;
+            { /* do nothing */ }
             else if (entry.type == FIELD_TYPE_BYTE.type)
-                ;
+            { /* do nothing */ }
             else
             {
                 Debug.debug("entry.type", entry.type);

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/icc/IccProfileParser.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/icc/IccProfileParser.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/icc/IccProfileParser.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/icc/IccProfileParser.java
Fri Dec  9 14:54:42 2011
@@ -266,7 +266,7 @@ public class IccProfileParser extends Bi
             {
                 // read stream to end, filling cache.
                 while (is.read() >= 0)
-                    ;
+                { /* do nothing */ }
             }
 
             byte data[] = cis.getCache();

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java
Fri Dec  9 14:54:42 2011
@@ -88,11 +88,11 @@ public class ByteSourceImageTest extends
             checkGetImageSize(imageFile, imageFileBytes);
 
             ImageFormat imageFormat = Sanselan.guessFormat(imageFile);
-            if (ImageFormat.IMAGE_FORMAT_JPEG == imageFormat
-                    || ImageFormat.IMAGE_FORMAT_UNKNOWN == imageFormat)
-                ;
-            else
+            if (ImageFormat.IMAGE_FORMAT_JPEG != imageFormat
+             && ImageFormat.IMAGE_FORMAT_UNKNOWN != imageFormat)
+            {
                 checkGetBufferedImage(imageFile, imageFileBytes);
+            }
         }
     }
 

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/ExifRewriteTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/ExifRewriteTest.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/ExifRewriteTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/ExifRewriteTest.java
Fri Dec  9 14:54:42 2011
@@ -450,7 +450,7 @@ public class ExifRewriteTest extends Exi
                 if (!oldField.tagInfo.isOffset())
                 {
                     if (oldField.tagInfo.isText())
-                        ;
+                    { /* do nothing */ }
                     else if (oldField.isLocalValue())
                     {
                         //                        Debug.debug("oldField.tag", oldField.tag);

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/MakerNoteFieldTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/MakerNoteFieldTest.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/MakerNoteFieldTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/MakerNoteFieldTest.java
Fri Dec  9 14:54:42 2011
@@ -35,13 +35,13 @@ public class MakerNoteFieldTest extends 
     protected void checkField(File imageFile, TiffField field)
             throws IOException, ImageReadException, ImageWriteException
     {
-        if (field.tag == EXIF_TAG_MAKER_NOTE.tag)
-            ;
-        else
+        if (field.tag != EXIF_TAG_MAKER_NOTE.tag)
+        {
             //            if (field.tag == EXIF_TAG_EXIF_OFFSET.tag)
             //                ;
             //            else
             return;
+        }
 
         Debug.debug("imageFile", imageFile);
         Debug.debug("field", field);

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/TextFieldTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/TextFieldTest.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/TextFieldTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/jpeg/exif/TextFieldTest.java
Fri Dec  9 14:54:42 2011
@@ -36,13 +36,13 @@ public class TextFieldTest extends Speci
             throws IOException, ImageReadException, ImageWriteException
     {
         if (field.tag == EXIF_TAG_USER_COMMENT.tag)
-            ;
+        { /* do nothing */ }
         else if (field.tag == GPS_TAG_GPS_PROCESSING_METHOD.tag
                 && field.directoryType == EXIF_DIRECTORY_GPS.directoryType)
-            ;
+        { /* do nothing */ }
         else if (field.tag == GPS_TAG_GPS_AREA_INFORMATION.tag
                 && field.directoryType == EXIF_DIRECTORY_GPS.directoryType)
-            ;
+        { /* do nothing */ }
         else
             return;
 

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/xmp/XmpUpdateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/xmp/XmpUpdateTest.java?rev=1212460&r1=1212459&r2=1212460&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/xmp/XmpUpdateTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/xmp/XmpUpdateTest.java
Fri Dec  9 14:54:42 2011
@@ -64,11 +64,11 @@ public class XmpUpdateTest extends Sanse
             assertNotNull(xmpXml);
 
             if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_PNG))
-                ;
+            { /* do nothing */ }
             else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_TIFF))
-                ;
+            { /* do nothing */ }
             else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_GIF))
-                ;
+            { /* do nothing */ }
             else
                 continue;
 



Mime
View raw message