More tweaks to jmx related error handling

This commit is contained in:
Kris De Volder
2018-12-06 11:33:09 -08:00
parent f0bd1f7f37
commit f6b81739f2

View File

@@ -195,6 +195,10 @@ public abstract class AbstractSpringBootApp implements SpringBootApp {
}
} catch (IOException e) {
//ignore.. app stopped
} catch (ExecutionException e) {
if (!(e.getCause() instanceof IOException)) {
throw e;
}
}
return null;
}
@@ -377,6 +381,10 @@ public abstract class AbstractSpringBootApp implements SpringBootApp {
}
} catch (IOException e) {
//ignore... probably just because app is stopped
} catch (ExecutionException e) {
if (!(e.getCause() instanceof IOException)) {
throw e;
}
}
return null;
}
@@ -443,8 +451,12 @@ public abstract class AbstractSpringBootApp implements SpringBootApp {
return bootVersion != null && environment != null ? ContextPath.getContextPath(bootVersion, environment) : null;
} catch (IOException e) {
//Ignore... happens a low when app is stopped
return null;
} catch (ExecutionException e) {
if (!(e.getCause() instanceof IOException)) {
throw e;
}
}
return null;
}
/**