mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
fix some deprecated warnings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -37,7 +37,6 @@ package sonia.scm.plugin;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.io.Closeables;
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Module;
|
||||
|
||||
@@ -55,6 +54,7 @@ import sonia.scm.plugin.ext.Extension;
|
||||
import sonia.scm.plugin.ext.ExtensionBinder;
|
||||
import sonia.scm.plugin.ext.ExtensionProcessor;
|
||||
import sonia.scm.plugin.ext.Extensions;
|
||||
import sonia.scm.util.IOUtil;
|
||||
import sonia.scm.web.security.DefaultAuthenticationHandler;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
@@ -146,8 +146,6 @@ public class DefaultPluginLoader implements PluginLoader
|
||||
*
|
||||
* @param classLoader
|
||||
* @param packages
|
||||
* @param annotation
|
||||
* @param processor
|
||||
* @param extensionPointProcessor
|
||||
* @param extensionProcessor
|
||||
* @param <T>
|
||||
@@ -488,7 +486,7 @@ public class DefaultPluginLoader implements PluginLoader
|
||||
}
|
||||
finally
|
||||
{
|
||||
Closeables.closeQuietly(input);
|
||||
IOUtil.close(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -607,7 +605,7 @@ public class DefaultPluginLoader implements PluginLoader
|
||||
}
|
||||
finally
|
||||
{
|
||||
Closeables.closeQuietly(content);
|
||||
IOUtil.close(content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -639,10 +637,19 @@ public class DefaultPluginLoader implements PluginLoader
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private AnnotationScannerFactory annotationScannerFactory;
|
||||
private final AnnotationScannerFactory annotationScannerFactory;
|
||||
|
||||
/** Field description */
|
||||
private Set<AnnotatedClass<Extension>> bounds = Sets.newHashSet();
|
||||
private final Set<AnnotatedClass<Extension>> bounds = Sets.newHashSet();
|
||||
|
||||
/** Field description */
|
||||
private final Set<Module> moduleSet = Sets.newHashSet();
|
||||
|
||||
/** Field description */
|
||||
private final Set<Plugin> installedPlugins = new HashSet<Plugin>();
|
||||
|
||||
/** Field description */
|
||||
private final ServletContext servletContext;
|
||||
|
||||
/** Field description */
|
||||
private URL coreFile;
|
||||
@@ -652,13 +659,4 @@ public class DefaultPluginLoader implements PluginLoader
|
||||
|
||||
/** Field description */
|
||||
private Set<AnnotatedClass<Extension>> extensions;
|
||||
|
||||
/** Field description */
|
||||
private Set<Module> moduleSet = Sets.newHashSet();
|
||||
|
||||
/** Field description */
|
||||
private Set<Plugin> installedPlugins = new HashSet<Plugin>();
|
||||
|
||||
/** Field description */
|
||||
private ServletContext servletContext;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ package sonia.scm.util;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.io.Closeables;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
@@ -235,7 +234,7 @@ public class DebugServlet extends HttpServlet
|
||||
}
|
||||
finally
|
||||
{
|
||||
Closeables.closeQuietly(writer);
|
||||
IOUtil.close(writer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user