提交 8598492f 编写于 作者: O Oleg Nenashev

Ignored Exceptions: use ‘ignored’ to supress IntellijIDEA warnings as suggested by @daniel-beck

上级 a3cc7780
......@@ -778,19 +778,20 @@ public class ClassicPluginStrategy implements PluginStrategy {
Class<?> c = ClassLoaderReflectionToolkit._findLoadedClass(pw.classLoader, name);
if (c!=null) return c;
return ClassLoaderReflectionToolkit._findClass(pw.classLoader, name);
} catch (ClassNotFoundException e) {
} catch (ClassNotFoundException ignored) {
//not found. try next
}
}
} else {
for (Dependency dep : dependencies) {
PluginWrapper p = pluginManager.getPlugin(dep.shortName);
if(p!=null)
if(p!=null) {
try {
return p.classLoader.loadClass(name);
} catch (ClassNotFoundException ex) {
// try next
} catch (ClassNotFoundException ignored) {
// OK, try next
}
}
}
}
......
......@@ -2309,7 +2309,7 @@ public final class FilePath implements Serializable {
// legacy agent.jar. Handle this gracefully
try {
LOGGER.log(Level.WARNING,"Looks like an old agent.jar. Please update "+ Which.jarFile(Channel.class)+" to the new version",e);
} catch (IOException ex) {
} catch (IOException ignored) {
// really ignore this time
}
}
......@@ -2427,8 +2427,8 @@ public final class FilePath implements Serializable {
// report both errors
e.addSuppressed(x);
throw e;
} catch (TimeoutException ex) {
// remote is hanging
} catch (TimeoutException ignored) {
// remote is hanging, just throw the original exception
throw e;
}
}
......
......@@ -46,7 +46,7 @@ public class Executables {
throws Error, RuntimeException {
try {
return e.getParent();
} catch (AbstractMethodError ex) {
} catch (AbstractMethodError ignored) { // will fallback to a private implementation
try {
Method m = e.getClass().getMethod("getParent");
m.setAccessible(true);
......
......@@ -219,7 +219,7 @@ public class ZFSInstaller extends AdministrativeMonitor implements Serializable
// revert the file system creation
try {
hudson.destory();
} catch (Exception ex) {
} catch (Exception ignored) {
// but ignore the error and let the original error thrown
}
throw e;
......
......@@ -5030,7 +5030,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
if (idx > 0) {
return new VersionNumber(versionString.substring(0,idx));
}
} catch (NumberFormatException ex) {
} catch (NumberFormatException ignored) {
// fall through
}
......
......@@ -77,7 +77,7 @@ public class JnlpSlaveRestarterInstaller extends ComputerListener implements Ser
try {
Engine.class.getMethod("addListener", EngineListener.class);
} catch (NoSuchMethodException ex) {
} catch (NoSuchMethodException ignored) {
return null; // running with older version of remoting that doesn't support adding listener
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册