diff options
author | PawelSzalapski <pawel.szalapski@nokia.com> | 2018-06-21 12:12:30 +0200 |
---|---|---|
committer | PawelSzalapski <pawel.szalapski@nokia.com> | 2018-06-24 14:18:02 +0200 |
commit | 943a47187dbb1393d720b2fdf0019d48270edb4d (patch) | |
tree | fef76ed7b3034597853ab9735f5052cab2f0d6d5 /src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java | |
parent | b4d5236a7164b166d49cf8c0a5c15bb848e04cd6 (diff) |
Remove dead code from VESCollector
Many things there are unused or have inproper modifiers,
spelling etc. I run static analysis tool (Intellij code inspect)
and clear those things up. It will be easier to maintain now.
No actual behavior changes were done.
Issue-ID: DCAEGEN2-526
Signed-off-by: PawelSzalapski <pawel.szalapski@nokia.com>
Change-Id: I1a4ad0c896bd32165cba654344ffc5245648c615
Diffstat (limited to 'src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java')
-rw-r--r-- | src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java b/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java index c0659aa6..0ee1e434 100644 --- a/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java +++ b/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java @@ -68,9 +68,9 @@ public class DmaapPropertyReader { Map<String, String> transformedDmaapProperties = new HashMap<>(); try { AnyNode root = AnyNode.parse(configFilePath); - if (root.hasKey("channels")) { // Check if dmaap config is handled by legacy controller/service/manager + if (isInLegacyFormat(root)) { transformedDmaapProperties = getLegacyDmaapPropertiesWithChannels(root.get("channels")); - } else {//Handing new format from controllergen2/config_binding_service + } else { transformedDmaapProperties = getDmaapPropertiesWithInfoData(root); } } catch (IOException e) { @@ -79,6 +79,10 @@ public class DmaapPropertyReader { return transformedDmaapProperties; } + private static boolean isInLegacyFormat(AnyNode root) { + return root.hasKey("channels"); + } + private static Map<String, String> getLegacyDmaapPropertiesWithChannels(AnyNode channelsNode) { return channelsNode.asList().stream() .map(DmaapPropertyReader::getTransformedMandatoryChannelProperties) |