From 34c9cffe5da04b99d03a3fce1b2006c73194c213 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Sun, 29 Apr 2018 21:12:06 +0000 Subject: [PATCH] disable ImageIO cache - probably need to set it in every test class or disable it in the beginning of all tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1830520 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hslf/usermodel/TestPicture.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java index 7a7a7b452..72eee287c 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPicture.java @@ -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.