You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/06/09 23:06:43 UTC

svn commit: r1747606 - /commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java

Author: ggregory
Date: Thu Jun  9 23:06:43 2016
New Revision: 1747606

URL: http://svn.apache.org/viewvc?rev=1747606&view=rev
Log:
Use try-with-resources.

Modified:
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java?rev=1747606&r1=1747605&r2=1747606&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java (original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java Thu Jun  9 23:06:43 2016
@@ -88,7 +88,6 @@ public class IcnsRoundTripTest extends I
             }
             bos.flush();
             writeAndReadImageData("1bpp-image-mask-versus-8bpp-mask", baos.toByteArray(), foreground, background);
-            bos.close();
         }
     }
 
@@ -126,8 +125,8 @@ public class IcnsRoundTripTest extends I
             }
             bos.flush();
             writeAndReadImageData("8bpp-image-8bpp-mask", baos.toByteArray(), foreground, background);
-            bos.close();
-        }}
+        }
+    }
 
     @Test
     public void test8BPPIcon8BPPMaskVersus1BPPMask() throws Exception {
@@ -183,7 +182,6 @@ public class IcnsRoundTripTest extends I
             }
             bos.flush();
             writeAndReadImageData("8bpp-image-8bpp-mask-vs-1bpp-mask", baos.toByteArray(), foreground, background);
-            bos.close();
         }
     }
 
@@ -241,7 +239,6 @@ public class IcnsRoundTripTest extends I
             }
             bos.flush();
             writeAndReadImageData("8bpp-image-1bpp-mask-vs-8bpp-mask", baos.toByteArray(), foreground, background);
-            bos.close();
         }
     }
 
@@ -267,7 +264,6 @@ public class IcnsRoundTripTest extends I
             }
             bos.flush();
             writeAndReadImageData("8bpp-image-no-mask", baos.toByteArray(), foreground, background);
-            bos.close();
         }}
 
     @Test
@@ -323,7 +319,6 @@ public class IcnsRoundTripTest extends I
             }
             bos.flush();
             writeAndReadImageData("32bpp-image-1bpp-mask", baos.toByteArray(), foreground, background);
-            bos.close();
         }
     }
 
@@ -376,7 +371,6 @@ public class IcnsRoundTripTest extends I
                 threw = true;
             }
             assertTrue("ICNS file with corrupt mask didn't fail to parse", threw);
-            bos.close();
         }
     }
 
@@ -407,7 +401,6 @@ public class IcnsRoundTripTest extends I
             }
             bos.flush();
             writeAndReadImageData("32bpp-mask-missing", baos.toByteArray(), foreground, background);
-            bos.close();
         }
     }