Behave robustly in the face of errors from AdministrativeMonitor.isActivated.
@@ -2174,7 +2174,14 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
* @since 2.64
*/
public List<AdministrativeMonitor> getActiveAdministrativeMonitors() {
- return administrativeMonitors.stream().filter(m -> m.isEnabled() && m.isActivated()).collect(Collectors.toList());
+ return administrativeMonitors.stream().filter(m -> {
+ try {
+ return m.isEnabled() && m.isActivated();
+ } catch (Throwable x) {
+ LOGGER.log(Level.WARNING, null, x);
+ return false;
+ }
+ }).collect(Collectors.toList());
}
public NodeDescriptor getDescriptor() {
