felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1074957 - /felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java
Date Sat, 26 Feb 2011 23:21:03 GMT
Author: pderop
Date: Sat Feb 26 23:21:02 2011
New Revision: 1074957

URL: http://svn.apache.org/viewvc?rev=1074957&view=rev
Log:
findbugs: check what is returned by mkdirs

Modified:
    felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java

Modified: felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java?rev=1074957&r1=1074956&r2=1074957&view=diff
==============================================================================
--- felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java
(original)
+++ felix/trunk/dependencymanager/test/src/test/java/org/apache/felix/dm/test/BundleGenerator.java
Sat Feb 26 23:21:02 2011
@@ -20,9 +20,9 @@ package org.apache.felix.dm.test;
 
 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 @@ public class BundleGenerator
             // 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.



Mime
View raw message