commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1764296 - in /commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging: common/bytesource/ByteSourceImageTest.java examples/ImageWriteExample.java formats/jpeg/JpegReadTest.java
Date Tue, 11 Oct 2016 16:39:46 GMT
Author: sebb
Date: Tue Oct 11 16:39:46 2016
New Revision: 1764296

URL: http://svn.apache.org/viewvc?rev=1764296&view=rev
Log:
Findbugs: valueOf is more efficient

Modified:
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java?rev=1764296&r1=1764295&r2=1764296&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
Tue Oct 11 16:39:46 2016
@@ -171,7 +171,7 @@ public class ByteSourceImageTest extends
         final ImageFormat imageFormat = Imaging.guessFormat(imageFile);
         if (imageFormat.equals(ImageFormats.TIFF)
                 || imageFormat.equals(ImageFormats.JPEG)) {
-            params.put(ImagingConstants.PARAM_KEY_READ_THUMBNAILS, new Boolean(!ignoreImageData));
+            params.put(ImagingConstants.PARAM_KEY_READ_THUMBNAILS, Boolean.valueOf(!ignoreImageData));
         }
 
         final ImageInfo imageInfoFile = Imaging.getImageInfo(imageFile, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java?rev=1764296&r1=1764295&r2=1764296&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java
Tue Oct 11 16:39:46 2016
@@ -40,7 +40,7 @@ public class ImageWriteExample {
         final Map<String, Object> params = new HashMap<>();
 
         // set optional parameters if you like
-        params.put(ImagingConstants.PARAM_KEY_COMPRESSION, new Integer(
+        params.put(ImagingConstants.PARAM_KEY_COMPRESSION, Integer.valueOf(
                 TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED));
 
         final byte[] bytes = Imaging.writeImageToBytes(image, format, params);

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java?rev=1764296&r1=1764295&r2=1764296&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegReadTest.java
Tue Oct 11 16:39:46 2016
@@ -54,7 +54,7 @@ public class JpegReadTest extends JpegBa
     public void test() throws Exception {
         final Map<String, Object> params = new HashMap<>();
         final boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
-        params.put(ImagingConstants.PARAM_KEY_READ_THUMBNAILS, new Boolean(!ignoreImageData));
+        params.put(ImagingConstants.PARAM_KEY_READ_THUMBNAILS, Boolean.valueOf(!ignoreImageData));
 
         final ImageMetadata metadata = Imaging.getMetadata(imageFile, params);
         // TODO only run this tests with images that have metadata...



Mime
View raw message