aboutsummaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-artifact-handler
diff options
context:
space:
mode:
authorvidhyasree <sn141y@att.com>2018-04-06 15:29:27 -0400
committerTakamune Cho <tc012c@att.com>2018-04-06 20:15:41 +0000
commit393648ea985f45a020dc69edfa729ac029cebe4f (patch)
tree319f320e427681e12abe350e0f15bd5013dcb408 /appc-inbound/appc-artifact-handler
parent9a4066e8a8721ef8baaadafc50f0d6ebf115ce4f (diff)
code fix to resolve duplct data in prop file
Code changes to Dbservice.java in artifact-handler Issue-ID: APPC-821 Change-Id: I805a16e90866e946ca2e8d331b2c63b3ef209f71 Signed-off-by: vidhyasree <sn141y@att.com>
Diffstat (limited to 'appc-inbound/appc-artifact-handler')
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
index ef11895a9..8e0e71ad0 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
@@ -382,26 +382,31 @@ public class DBService {
}
private void resolveUrlAction(String url, String property, PropertiesConfiguration conf) {
- if (conf.containsKey(property + "." + "url") && !url.isEmpty()) {
- conf.setProperty(property + "." + "url", url);
+ if (conf.containsKey(property + "." + "url") ) {
+ if (url != null && !url.isEmpty()) {
+ conf.setProperty(property + "." + "url", url);
+ }
} else {
conf.addProperty(property + "." + "url", url);
}
}
private void resolvePortAction(String port, String property, PropertiesConfiguration conf) {
- if (conf.containsKey(property + "." + "port") && !port.isEmpty()) {
- conf.setProperty(property + "." + "port", port);
+ if (conf.containsKey(property + "." + "port")) {
+ if (port != null && !port.isEmpty()) {
+ conf.setProperty(property + "." + "port", port);
+ }
} else {
conf.addProperty(property + "." + "port", port);
}
}
private void resolveUserAction(boolean isUpdate, String user, String property, PropertiesConfiguration conf) {
- if (conf.containsKey(property + "." + "user") && !user.isEmpty()) {
- conf.setProperty(property + "." + "user", user);
+ if (conf.containsKey(property + "." + "user")) {
+ if (user != null && !user.isEmpty()) {
+ conf.setProperty(property + "." + "user", user);
+ }
} else {
- log.info("is Adding to southbound.properties" + isUpdate);
conf.addProperty(property + "." + "user", user);
}
}