diff --git a/integration/src/main/java/org/assimbly/integration/impl/CamelIntegration.java b/integration/src/main/java/org/assimbly/integration/impl/CamelIntegration.java index b6825a17..ac654752 100644 --- a/integration/src/main/java/org/assimbly/integration/impl/CamelIntegration.java +++ b/integration/src/main/java/org/assimbly/integration/impl/CamelIntegration.java @@ -2174,9 +2174,9 @@ public String getFlowStats(String flowId, boolean fullStats, boolean includeMeta } } - cpuLoadLastMinute += Double.parseDouble(route.getLoad01()); - cpuLoadLast5Minutes += Double.parseDouble(route.getLoad05()); - cpuLoadLast15Minutes += Double.parseDouble(route.getLoad15()); + cpuLoadLastMinute += ParseDouble(route.getLoad01()); + cpuLoadLast5Minutes += ParseDouble(route.getLoad05()); + cpuLoadLast15Minutes += ParseDouble(route.getLoad15()); if(includeSteps){ JSONObject step = getStepStats(routeId, fullStats); @@ -3130,4 +3130,15 @@ private String getKeystorePassword() { return keystorePwd; } + private double ParseDouble(String strNumber) { + if (strNumber != null && strNumber.length() > 0) { + try { + return Double.parseDouble(strNumber); + } catch(Exception e) { + return 0; + } + } + return 0; + } + } \ No newline at end of file