diff options
author | shalomb <shalomb@amdocs.com> | 2017-11-15 09:22:34 +0200 |
---|---|---|
committer | shalomb <shalomb@amdocs.com> | 2017-11-15 09:22:34 +0200 |
commit | 185587ea94f38ea729a0416ba029297ecb8da324 (patch) | |
tree | 67b879c7db83a2cc661b299d0db19d571ccd794c /openecomp-be/lib | |
parent | 6319dfebab190e2ba0cb5a0e85032cd44835e947 (diff) |
Casandra data center and consistency level
fix null check
Change-Id: If1b541c3cacf0040cc13c6e1d57dd9fd854623e9
Issue-Id:SDC-656
Signed-off-by: shalomb <shalomb@amdocs.com>
Diffstat (limited to 'openecomp-be/lib')
-rw-r--r-- | openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java index 80adeb6e2a..fd7c1043e8 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/src/main/java/org/openecomp/core/nosqldb/util/ConfigurationManager.java @@ -112,10 +112,13 @@ public class ConfigurationManager { public String[] getAddresses() { String addresses = System.getProperty(CASSANDRA_ADDRESSES); - if (Objects.isNull(addresses)) { + if (Objects.nonNull(addresses)) { return addresses.split(","); } List lsAddresses = (ArrayList) cassandraConfiguration.get(CASSANDRA_HOSTS_KEY); + if (Objects.isNull(addresses) || addresses.length() == 0) { + throw new RuntimeException("Missing Cassandra hose.Cassandra host missing is mandatory."); + } String[] addressesArray; addressesArray = (String[]) lsAddresses.toArray(new String[lsAddresses.size()]); return addressesArray; |