fix some warning and removed some unused imports

This commit is contained in:
Sebastian Sdorra
2017-01-14 12:05:53 +01:00
parent c149b180a1
commit 7e6f4e1a7f
5 changed files with 26 additions and 59 deletions

View File

@@ -34,7 +34,6 @@ package sonia.scm.repository;
//~--- non-JDK imports --------------------------------------------------------
import com.google.common.io.Closeables;
import com.google.common.io.Resources;
import org.junit.Rule;
@@ -109,20 +108,13 @@ public class HgWindowsPackageFixTest
*/
private File createHgBat(String number) throws IOException
{
URL url =
Resources.getResource("sonia/scm/repository/hg.bat.".concat(number));
URL url = Resources.getResource("sonia/scm/repository/hg.bat.".concat(number));
File file = tempFolder.newFile(number);
FileOutputStream fos = null;
try
try (FileOutputStream fos = new FileOutputStream(file))
{
fos = new FileOutputStream(file);
Resources.copy(url, fos);
}
finally
{
Closeables.closeQuietly(fos);
}
return file;
}