diff options
author | 2018-07-25 13:25:43 -0400 | |
---|---|---|
committer | 2018-07-30 11:49:36 -0400 | |
commit | aa9b320ff93511280cf51b03d38fb9254af6b530 (patch) | |
tree | 434819201ead235fad2e7fb663b0480695156db4 /ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util | |
parent | fe3a67c11b65d7989a6ef648c3f34eee8abe7394 (diff) |
JUnits for coverage
Issue-ID: PORTAL-273
JUnits for sonar coverage
Change-Id: Icb88d8563164281d29877bbc2de9c8f1f780aa0c
Signed-off-by: sa282w <sa282w@att.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicProperties.java | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicProperties.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicProperties.java index 5ff22635..e867deb1 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicProperties.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/util/MusicProperties.java @@ -2,7 +2,7 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright © 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed @@ -186,4 +186,40 @@ public class MusicProperties { } return true; } + + /** + * Tests whether a property value is available for the specified key. + * + * @param key + * Property key + * @return True if the key is known, otherwise false. + */ +/* public static boolean containsProperty(String key) { + return environment.containsProperty(key); + }*/ + + /** + * Returns the property value associated with the given key (never + * {@code null}), after trimming any trailing space. + * + * @param key + * Property key + * @return Property value; the empty string if the environment was not + * autowired, which should never happen. + * @throws IllegalStateException + * if the key is not found + */ +/* public static String getProperty(String key) { + String value = ""; + if (environment == null) { + // logger.error(EELFLoggerDelegate.errorLogger, "getProperty: environment is null, should never happen!"); + } else { + value = environment.getRequiredProperty(key); + // java.util.Properties preserves trailing space + if (value != null) + value = value.trim(); + } + return value; + }*/ + } |