mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
fix some warning and removed some unused imports
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user