]> source.dussan.org Git - poi.git/commitdiff
disable ImageIO cache - probably need to set it in every test class or disable it...
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 29 Apr 2018 21:12:06 +0000 (21:12 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 29 Apr 2018 21:12:06 +0000 (21:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1830520 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java

index 7a7a7b452d891ce4bf66357dd84106967d3dbdd7..72eee287c2fc505490db3ce7cdc40ff810e7e094 100644 (file)
@@ -47,6 +47,7 @@ import org.apache.poi.sl.draw.DrawFactory;
 import org.apache.poi.sl.usermodel.PictureData.PictureType;
 import org.apache.poi.sl.usermodel.Slide;
 import org.apache.poi.sl.usermodel.SlideShow;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 
@@ -58,6 +59,11 @@ import org.junit.Test;
 public final class TestPicture {
     private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
 
+    @BeforeClass
+    public static void disableImageIOCache() {
+        ImageIO.setUseCache(false);
+    }
+
     /**
      * Test that the reference count of a blip is incremented every time the picture is inserted.
      * This is important when the same image appears multiple times in a slide show.