From 5be8213f3724d2995877c7954266625a4f5daffb Mon Sep 17 00:00:00 2001 From: burdziak Date: Fri, 26 Jan 2018 11:49:11 +0100 Subject: Fix in StringHelper Change-Id: I9a7863031191c0cc8727f3757cb9add3be38b592 Issue-ID: APPC-538 Signed-off-by: burdziak --- appc-common/src/main/java/org/onap/appc/util/StringHelper.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appc-common/src/main/java/org/onap/appc/util/StringHelper.java b/appc-common/src/main/java/org/onap/appc/util/StringHelper.java index 2e68cbba4..19dddc1f6 100644 --- a/appc-common/src/main/java/org/onap/appc/util/StringHelper.java +++ b/appc-common/src/main/java/org/onap/appc/util/StringHelper.java @@ -26,6 +26,9 @@ package org.onap.appc.util; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; + import java.util.Date; import java.util.List; import java.util.Map; @@ -40,6 +43,7 @@ import java.util.regex.Pattern; */ public final class StringHelper { + private static final EELFLogger logger = EELFManager.getInstance().getLogger(StringHelper.class); public static final String DASH = "-"; public static final String DOT = "."; @@ -542,7 +546,7 @@ public final class StringHelper { return Integer.parseInt(input); } catch (NumberFormatException nfe) { // Should not happen - nfe.printStackTrace(); + logger.error(nfe.getMessage()); } } @@ -552,6 +556,7 @@ public final class StringHelper { return Double.parseDouble(input); } catch (NumberFormatException | NullPointerException e) { // NPE won't happen bc of regex check + logger.error(e.getMessage()); } } -- cgit 1.2.3-korg