From f6b81739f2c1ac53a8ae9fa21abed18bf3f98c35 Mon Sep 17 00:00:00 2001 From: Kris De Volder Date: Thu, 6 Dec 2018 11:33:09 -0800 Subject: [PATCH] More tweaks to jmx related error handling --- .../boot/app/cli/AbstractSpringBootApp.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/AbstractSpringBootApp.java b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/AbstractSpringBootApp.java index 7712f3ad4..8510253fd 100644 --- a/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/AbstractSpringBootApp.java +++ b/headless-services/commons/commons-boot-app-cli/src/main/java/org/springframework/ide/vscode/commons/boot/app/cli/AbstractSpringBootApp.java @@ -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; } /**