]> source.dussan.org Git - jgit.git/commitdiff
[findBugs] Don't ignore exceptional return value of File.mkdir() 37/22137/2
authorMatthias Sohn <matthias.sohn@sap.com>
Tue, 18 Feb 2014 08:25:31 +0000 (09:25 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 18 Feb 2014 21:08:09 +0000 (22:08 +0100)
Change-Id: Ic4c61472412aa158a355bb444805cde8c5d2833a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java

index 4408d7bb354dc29903c7549874b0424aa18accc4..a18c4671d899b5843f8755963a436bdaffc84ac5 100644 (file)
@@ -60,6 +60,7 @@ import org.eclipse.jgit.patch.FileHeader;
 import org.eclipse.jgit.patch.HunkHeader;
 import org.eclipse.jgit.treewalk.FileTreeIterator;
 import org.eclipse.jgit.treewalk.filter.PathFilter;
+import org.eclipse.jgit.util.FileUtils;
 import org.eclipse.jgit.util.RawParseUtils;
 import org.eclipse.jgit.util.io.DisabledOutputStream;
 import org.eclipse.jgit.util.io.SafeBufferedOutputStream;
@@ -312,7 +313,7 @@ public class DiffFormatterTest extends RepositoryTestCase {
        public void testDiff() throws Exception {
                write(new File(db.getDirectory().getParent(), "test.txt"), "test");
                File folder = new File(db.getDirectory().getParent(), "folder");
-               folder.mkdir();
+               FileUtils.mkdir(folder);
                write(new File(folder, "folder.txt"), "folder");
                Git git = new Git(db);
                git.add().addFilepattern(".").call();