Ensure that the tempdir exists when we use ImageIO in one of the tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1816046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e22d67682f
commit
d6f97af799
@ -19,6 +19,7 @@ package org.apache.poi.hwpf;
|
|||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
@ -57,6 +58,11 @@ public final class TestHWPFPictures extends TestCase {
|
|||||||
imgBFile = "simple_image.png";
|
imgBFile = "simple_image.png";
|
||||||
imgCFile = "vector_image.emf";
|
imgCFile = "vector_image.emf";
|
||||||
imgDFile = "GaiaTestImg.png";
|
imgDFile = "GaiaTestImg.png";
|
||||||
|
|
||||||
|
// we use ImageIO in one of the tests here so we should ensure that the temporary directory is created correctly
|
||||||
|
File tempDir = new File(System.getProperty("java.io.tmpdir"));
|
||||||
|
assertTrue("Could not create temporary directory " + tempDir.getAbsolutePath() + ": " + tempDir.exists() + "/" + tempDir.isDirectory(),
|
||||||
|
tempDir.exists() || tempDir.mkdirs());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user