mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
Fix CatchingUnchecked Error Prone violations (#5950)
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
This commit is contained in:
1 parent
cce020fdf3
commit
2ea1148286
31 files changed
+43
-53
No files matched your search
@@ -204,7 +204,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
// Secure initialization
|
||||
CHECK_UPDATE_SLEEP_TIME_MILLIS = SystemProperties.getInteger(PluginManager.class.getName() + ".checkUpdateSleepTimeMillis", 1000);
|
||||
CHECK_UPDATE_ATTEMPTS = SystemProperties.getInteger(PluginManager.class.getName() + ".checkUpdateAttempts", 1);
|
||||
} catch(Exception e) {
|
||||
} catch(RuntimeException e) {
|
||||
LOGGER.warning(String.format("There was an error initializing the PluginManager. Exception: %s", e));
|
||||
} finally {
|
||||
CHECK_UPDATE_ATTEMPTS = CHECK_UPDATE_ATTEMPTS > 0 ? CHECK_UPDATE_ATTEMPTS : 1;
|
||||
@@ -1584,7 +1584,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
responseData.put("correlationId", correlationId.toString());
|
||||
|
||||
return hudson.util.HttpResponses.okJSON(responseData);
|
||||
} catch (Exception e) {
|
||||
} catch (RuntimeException e) {
|
||||
return hudson.util.HttpResponses.errorJSON(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user