Remove unneeded @SuppressWarnings("resource")
Change-Id: Ief5d5536fb34e55dfb14e3977f59b23823b2d132 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -36,7 +36,6 @@ public class SshSession {
|
|||||||
this.account = account;
|
this.account = account;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("resource")
|
|
||||||
public String exec(String command) throws JSchException, IOException {
|
public String exec(String command) throws JSchException, IOException {
|
||||||
ChannelExec channel = (ChannelExec) getSession().openChannel("exec");
|
ChannelExec channel = (ChannelExec) getSession().openChannel("exec");
|
||||||
try {
|
try {
|
||||||
|
@@ -64,11 +64,9 @@ public class InitPluginStepsLoader {
|
|||||||
|
|
||||||
private InitStep loadInitStep(File jar) {
|
private InitStep loadInitStep(File jar) {
|
||||||
try {
|
try {
|
||||||
@SuppressWarnings("resource")
|
|
||||||
ClassLoader pluginLoader =
|
ClassLoader pluginLoader =
|
||||||
new URLClassLoader(new URL[] {jar.toURI().toURL()},
|
new URLClassLoader(new URL[] {jar.toURI().toURL()},
|
||||||
InitPluginStepsLoader.class.getClassLoader());
|
InitPluginStepsLoader.class.getClassLoader());
|
||||||
@SuppressWarnings("resource")
|
|
||||||
JarFile jarFile = new JarFile(jar);
|
JarFile jarFile = new JarFile(jar);
|
||||||
Attributes jarFileAttributes = jarFile.getManifest().getMainAttributes();
|
Attributes jarFileAttributes = jarFile.getManifest().getMainAttributes();
|
||||||
String initClassName = jarFileAttributes.getValue("Gerrit-InitStep");
|
String initClassName = jarFileAttributes.getValue("Gerrit-InitStep");
|
||||||
|
@@ -57,7 +57,6 @@ public final class IoUtil {
|
|||||||
if (!(cl instanceof URLClassLoader)) {
|
if (!(cl instanceof URLClassLoader)) {
|
||||||
throw noAddURL("Not loaded by URLClassLoader", null);
|
throw noAddURL("Not loaded by URLClassLoader", null);
|
||||||
}
|
}
|
||||||
@SuppressWarnings("resource")
|
|
||||||
URLClassLoader urlClassLoader = (URLClassLoader) cl;
|
URLClassLoader urlClassLoader = (URLClassLoader) cl;
|
||||||
|
|
||||||
Method addURL;
|
Method addURL;
|
||||||
|
Reference in New Issue
Block a user