findbugs: check what is returned by mkdirs
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1074957 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java
index 9c28af7..48368cb 100644
--- a/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java
+++ b/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java
@@ -20,9 +20,9 @@
import java.io.File;
import java.io.FileWriter;
+import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
-import java.util.HashSet;
import java.util.Properties;
import aQute.lib.osgi.Analyzer;
@@ -79,9 +79,12 @@
// Check if the system tmp dir exists
File tmp = new File(System.getProperty("java.io.tmpdir"));
- if (tmp != null && !tmp.exists())
+ if (!tmp.exists())
{
- tmp.mkdirs();
+ if (! tmp.mkdirs())
+ {
+ throw new IOException("Could not create temporary directory: " + tmp);
+ }
}
// Deduce the classpath from Export-Package, or Private-Package headers.