fix some deprecated warnings

This commit is contained in:
Sebastian Sdorra
2014-01-11 14:40:59 +01:00
parent 66da3a247b
commit a4e001808d
20 changed files with 119 additions and 113 deletions

View File

@@ -54,6 +54,7 @@ import java.io.OutputStream;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.StreamingOutput;
import sonia.scm.util.IOUtil;
/**
*
@@ -134,18 +135,18 @@ public class BrowserStreamingOutput implements StreamingOutput
}
finally
{
Closeables.closeQuietly(repositoryService);
IOUtil.close(repositoryService);
}
}
//~--- fields ---------------------------------------------------------------
/** Field description */
private CatCommandBuilder builder;
private final CatCommandBuilder builder;
/** Field description */
private String path;
private final String path;
/** Field description */
private RepositoryService repositoryService;
private final RepositoryService repositoryService;
}

View File

@@ -54,6 +54,7 @@ import java.io.OutputStream;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.StreamingOutput;
import sonia.scm.util.IOUtil;
/**
*
@@ -129,15 +130,15 @@ public class DiffStreamingOutput implements StreamingOutput
}
finally
{
Closeables.closeQuietly(repositoryService);
IOUtil.close(repositoryService);
}
}
//~--- fields ---------------------------------------------------------------
/** Field description */
private DiffCommandBuilder builder;
private final DiffCommandBuilder builder;
/** Field description */
private RepositoryService repositoryService;
private final RepositoryService repositoryService;
}

View File

@@ -36,7 +36,6 @@ package sonia.scm.api.rest.resources;
//~--- non-JDK imports --------------------------------------------------------
import com.google.common.base.Strings;
import com.google.common.io.Closeables;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -75,6 +74,7 @@ import sonia.scm.security.RepositoryPermission;
import sonia.scm.security.ScmSecurityException;
import sonia.scm.util.AssertUtil;
import sonia.scm.util.HttpUtil;
import sonia.scm.util.IOUtil;
import sonia.scm.util.Util;
//~--- JDK imports ------------------------------------------------------------
@@ -383,7 +383,7 @@ public class RepositoryResource
}
finally
{
Closeables.closeQuietly(service);
IOUtil.close(service);
}
return response;
@@ -443,7 +443,7 @@ public class RepositoryResource
}
finally
{
Closeables.closeQuietly(service);
IOUtil.close(service);
}
return response;
@@ -534,7 +534,7 @@ public class RepositoryResource
}
finally
{
Closeables.closeQuietly(service);
IOUtil.close(service);
}
return response;
@@ -638,7 +638,7 @@ public class RepositoryResource
}
finally
{
Closeables.closeQuietly(service);
IOUtil.close(service);
}
}
else
@@ -741,7 +741,7 @@ public class RepositoryResource
}
finally
{
Closeables.closeQuietly(service);
IOUtil.close(service);
}
return response;
@@ -960,7 +960,7 @@ public class RepositoryResource
}
finally
{
Closeables.closeQuietly(service);
IOUtil.close(service);
}
return response;