commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1648326 - in /commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging: examples/ formats/gif/ formats/icns/ formats/ico/ formats/jpeg/exif/ formats/pam/ formats/pcx/ formats/png/ formats/psd/ formats/wbmp/ formats/xbm/ format...
Date Mon, 29 Dec 2014 12:59:49 GMT
Author: sebb
Date: Mon Dec 29 12:59:48 2014
New Revision: 1648326

URL: http://svn.apache.org/r1648326
Log:
Dummy check to avoid unused warnings

Modified:
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/TextFieldTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pam/PamReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pcx/PcxReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteForceTrueColorText.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/psd/PsdReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java
Mon Dec 29 12:59:48 2014
@@ -34,6 +34,7 @@ import org.apache.commons.imaging.common
 
 public class SampleUsage {
 
+    @SuppressWarnings("unused")
     public SampleUsage() {
 
         try {

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/gif/GifReadTest.java
Mon Dec 29 12:59:48 2014
@@ -27,6 +27,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class GifReadTest extends GifBaseTest {
@@ -42,7 +43,7 @@ public class GifReadTest extends GifBase
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile);
             assertNotNull(imageInfo);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsReadTest.java
Mon Dec 29 12:59:48 2014
@@ -29,6 +29,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class IcnsReadTest extends IcnsBaseTest {
@@ -44,7 +45,7 @@ public class IcnsReadTest extends IcnsBa
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/ico/IcoReadTest.java
Mon Dec 29 12:59:48 2014
@@ -29,6 +29,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class IcoReadTest extends IcoBaseTest {
@@ -44,11 +45,11 @@ public class IcoReadTest extends IcoBase
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);
-            // assertNotNull(imageInfo);
+            Assert.assertFalse(params.equals(imageInfo)); // Dummy check to avoid unused
warning (it may be null)
 
             final BufferedImage image = Imaging.getBufferedImage(imageFile);
             assertNotNull(image);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriteTest.java
Mon Dec 29 12:59:48 2014
@@ -49,6 +49,7 @@ import org.apache.commons.imaging.format
 import org.apache.commons.imaging.formats.tiff.write.TiffOutputSet;
 import org.apache.commons.imaging.util.Debug;
 import org.apache.commons.io.FileUtils;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class ExifRewriteTest extends ExifBaseTest implements AllTagConstants {
@@ -77,7 +78,7 @@ public class ExifRewriteTest extends Exi
             {
                 final JpegImageMetadata metadata = (JpegImageMetadata) Imaging
                         .getMetadata(imageFile);
-                // assertNotNull(metadata.getExif());
+                Assert.assertNotNull(metadata);
             }
 
             {

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/TextFieldTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/TextFieldTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/TextFieldTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/TextFieldTest.java
Mon Dec 29 12:59:48 2014
@@ -27,6 +27,7 @@ import org.apache.commons.imaging.format
 import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants;
 import org.apache.commons.imaging.formats.tiff.constants.TiffDirectoryType;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 
 public class TextFieldTest extends SpecificExifTagTest {
     // public TextFieldTest(String name)
@@ -64,6 +65,7 @@ public class TextFieldTest extends Speci
 
         try {
             final Object textFieldValue = field.getValue();
+            Assert.assertNotNull(textFieldValue);
             // Debug.debug("imageFile", imageFile.getAbsoluteFile());
             // Debug.debug("Text field value(" + field.tagInfo.name + ")",
             // textFieldValue);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pam/PamReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pam/PamReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pam/PamReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pam/PamReadTest.java
Mon Dec 29 12:59:48 2014
@@ -29,6 +29,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class PamReadTest extends PamBaseTest {
@@ -44,7 +45,7 @@ public class PamReadTest extends PamBase
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pcx/PcxReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pcx/PcxReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pcx/PcxReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/pcx/PcxReadTest.java
Mon Dec 29 12:59:48 2014
@@ -29,6 +29,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class PcxReadTest extends PcxBaseTest {
@@ -44,7 +45,7 @@ public class PcxReadTest extends PcxBase
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngReadTest.java
Mon Dec 29 12:59:48 2014
@@ -28,6 +28,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class PngReadTest extends PngBaseTest {
@@ -61,7 +62,7 @@ public class PngReadTest extends PngBase
                 }
             } else {
                 final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-                // assertNotNull(metadata);
+                Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
                 final ImageInfo imageInfo = Imaging.getImageInfo(imageFile);
                 assertNotNull(imageInfo);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteForceTrueColorText.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteForceTrueColorText.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteForceTrueColorText.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngWriteForceTrueColorText.java
Mon Dec 29 12:59:48 2014
@@ -64,6 +64,7 @@ public class PngWriteForceTrueColorText
 
                 final BufferedImage image2 = Imaging.getBufferedImage(outFile,
                         new HashMap<String, Object>());
+                assertNotNull(image2);
             } catch (final Exception e) {
                 Debug.debug("imageFile", imageFile);
                 throw e;

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/psd/PsdReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/psd/PsdReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/psd/PsdReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/psd/PsdReadTest.java
Mon Dec 29 12:59:48 2014
@@ -28,6 +28,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class PsdReadTest extends PsdBaseTest {
@@ -42,7 +43,7 @@ public class PsdReadTest extends PsdBase
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpReadTest.java
Mon Dec 29 12:59:48 2014
@@ -27,6 +27,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class WbmpReadTest extends WbmpBaseTest {
@@ -41,7 +42,7 @@ public class WbmpReadTest extends WbmpBa
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xbm/XbmReadTest.java
Mon Dec 29 12:59:48 2014
@@ -27,6 +27,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class XbmReadTest extends XbmBaseTest {
@@ -41,7 +42,7 @@ public class XbmReadTest extends XbmBase
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java?rev=1648326&r1=1648325&r2=1648326&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/xpm/XpmReadTest.java
Mon Dec 29 12:59:48 2014
@@ -27,6 +27,7 @@ import org.apache.commons.imaging.ImageI
 import org.apache.commons.imaging.Imaging;
 import org.apache.commons.imaging.common.ImageMetadata;
 import org.apache.commons.imaging.util.Debug;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class XpmReadTest extends XpmBaseTest {
@@ -41,7 +42,7 @@ public class XpmReadTest extends XpmBase
             Debug.debug("imageFile", imageFile);
 
             final ImageMetadata metadata = Imaging.getMetadata(imageFile);
-            // assertNotNull(metadata);
+            Assert.assertFalse(metadata instanceof File); // Dummy check to avoid unused
warning (it may be null)
 
             final Map<String, Object> params = new HashMap<String, Object>();
             final ImageInfo imageInfo = Imaging.getImageInfo(imageFile, params);



Mime
View raw message