commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1661752 - in /commons/proper/imaging/trunk/src: changes/changes.xml test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java
Date Mon, 23 Feb 2015 19:08:44 GMT
Author: britter
Date: Mon Feb 23 19:08:44 2015
New Revision: 1661752

URL: http://svn.apache.org/r1661752
Log:
IMAGING-166: ByteSourceImageTest: Local variable hides a field. This also fixes #7 from github.
Thanks to Michael Groß.

Modified:
    commons/proper/imaging/trunk/src/changes/changes.xml
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/common/bytesource/ByteSourceImageTest.java

Modified: commons/proper/imaging/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/changes/changes.xml?rev=1661752&r1=1661751&r2=1661752&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/changes/changes.xml (original)
+++ commons/proper/imaging/trunk/src/changes/changes.xml Mon Feb 23 19:08:44 2015
@@ -46,6 +46,9 @@ The <action> type attribute can be add,u
   <body>
 
     <release version="1.0" date="TBA" description="TBA">
+      <action issue="IMAGING-166" dev="britter" type="update" due-to="Michael Groß">
+        ByteSourceImageTest: Local variable hides a field
+      </action>
       <action issue="IMAGING-156" dev="britter" type="update">
         Refactor TagConstants
       </action>

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=1661752&r1=1661751&r2=1661752&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
Mon Feb 23 19:08:44 2015
@@ -107,13 +107,13 @@ public class ByteSourceImageTest extends
     }
 
     public void checkGetBufferedImage(final File file, final byte[] bytes) throws Exception
{
-        BufferedImage imageFile = Imaging.getBufferedImage(file);
-        assertNotNull(imageFile);
-        assertTrue(imageFile.getWidth() > 0);
-        assertTrue(imageFile.getHeight() > 0);
-        final int imageFileWidth = imageFile.getWidth();
-        final int imageFileHeight = imageFile.getHeight();
-        imageFile = null;
+        BufferedImage bufferedImage = Imaging.getBufferedImage(file);
+        assertNotNull(bufferedImage);
+        assertTrue(bufferedImage.getWidth() > 0);
+        assertTrue(bufferedImage.getHeight() > 0);
+        final int imageFileWidth = bufferedImage.getWidth();
+        final int imageFileHeight = bufferedImage.getHeight();
+        bufferedImage = null;
 
         final BufferedImage imageBytes = Imaging.getBufferedImage(bytes);
         assertNotNull(imageBytes);



Mime
View raw message