summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2011-01-10 22:45:47 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2011-01-28 01:11:12 +0100
commita6e3f5306966e4befde17358c79941bc5849f826 (patch)
tree80f54b2127920e3c459d0e7bc7af595f6a9fdb8d /org.eclipse.jgit.http.test
parent9ec97688b905b27163295cca9a9fc6fa78cf09e0 (diff)
downloadjgit-a6e3f5306966e4befde17358c79941bc5849f826.tar.gz
jgit-a6e3f5306966e4befde17358c79941bc5849f826.zip
[findbugs] Do not ignore exceptional return value of createNewFile()
Properly handle return value of java.io.File.createNewFile(). Change-Id: I3a74cc84cd126ca1a0eaccc77b2944d783ff0747 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.http.test')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java
index a7e31a5d4c..7009cf98a3 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java
@@ -47,7 +47,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.File;
@@ -58,6 +57,7 @@ import org.eclipse.jgit.http.server.resolver.FileResolver;
import org.eclipse.jgit.http.server.resolver.ServiceNotEnabledException;
import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.util.FileUtils;
import org.junit.Test;
public class FileResolverTest extends LocalDiskRepositoryTestCase {
@@ -116,8 +116,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
fail("did not honor export-all flag");
}
- export.createNewFile();
- assertTrue("has git-daemon-export-ok", export.exists());
+ FileUtils.createNewFile(export);
resolver = new FileResolver(base, false /* require flag */);
try {
resolver.open(null, name).close();