summaryrefslogtreecommitdiffstats
path: root/prh-app-server/src/main
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-03-22 10:42:42 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-22 10:42:42 +0000
commitd4fc5abcb85f2caa2d5062a063ca2d5ea339e73f (patch)
tree7908fc6ba2f66906a0c158d5a6ff757db092009c /prh-app-server/src/main
parent941db7477e728b28631c98b851bff936a5bcecd4 (diff)
parentc85d30c68054fe76eb0ffc9e9264336a37476451 (diff)
Merge "Remove IP requirement"
Diffstat (limited to 'prh-app-server/src/main')
-rw-r--r--prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
index a69b7c54..b628d961 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java
@@ -120,7 +120,7 @@ public class DmaapConsumerJsonParser {
this.pnfSwVersionOptionalField = getValueFromJson(pnfRegistrationFields, SW_VERSION);
this.pnfAdditionalFields = pnfRegistrationFields.getAsJsonObject(ADDITIONAL_FIELDS);
- return (StringUtils.isEmpty(pnfSourceName) || !ipPropertiesNotEmpty(pnfOamIpv4Address, pnfOamIpv6Address))
+ return (StringUtils.isEmpty(pnfSourceName))
? logErrorAndReturnMonoEmpty("Incorrect json, consumerDmaapModel can not be created: "
+ printMessage()) :
Mono.just(ImmutableConsumerDmaapModel.builder()
@@ -140,10 +140,6 @@ public class DmaapConsumerJsonParser {
return jsonObject.has(jsonKey) ? jsonObject.get(jsonKey).getAsString() : "";
}
- private boolean ipPropertiesNotEmpty(String ipv4, String ipv6) {
- return (!StringUtils.isEmpty(ipv4)) || !(StringUtils.isEmpty(ipv6));
- }
-
private boolean containsHeader(JsonObject jsonObject) {
return jsonObject.has(EVENT) && jsonObject.getAsJsonObject(EVENT).has(PNF_REGISTRATION_FIELDS);
}