gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [1/2] gora git commit: GORA-499 Fix for a potential NPE
Date Mon, 30 Jan 2017 18:03:12 GMT
Repository: gora
Updated Branches:
  refs/heads/master fb7622fe7 -> fbf5d58e7


GORA-499 Fix for a potential NPE


Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/33bab4a3
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/33bab4a3
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/33bab4a3

Branch: refs/heads/master
Commit: 33bab4a3e4711028adc30766b0cc797dab4604ba
Parents: 1fe93b6
Author: JC <jc@lifove.net>
Authored: Sat Jan 28 01:44:00 2017 -0500
Committer: JC <jc@lifove.net>
Committed: Sat Jan 28 01:44:00 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/gora/cassandra/store/CassandraClient.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/33bab4a3/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
index 46f86a6..1f9d614 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
@@ -208,10 +208,10 @@ public class CassandraClient<K, T extends PersistentBase> {
       ccl.setReadCfConsistencyLevels(clmap);
       ccl.setWriteCfConsistencyLevels(clmap);
       // Operations consistency levels
-      String opConsisLvl = (readOpConsLvl!=null || !readOpConsLvl.isEmpty())?readOpConsLvl:DEFAULT_HECTOR_CONSIS_LEVEL;
+      String opConsisLvl = (readOpConsLvl!=null && !readOpConsLvl.isEmpty())?readOpConsLvl:DEFAULT_HECTOR_CONSIS_LEVEL;
       ccl.setDefaultReadConsistencyLevel(HConsistencyLevel.valueOf(opConsisLvl));
       LOG.debug("Hector read consistency configured to '" + opConsisLvl + "'.");
-      opConsisLvl = (writeOpConsLvl!=null || !writeOpConsLvl.isEmpty())?writeOpConsLvl:DEFAULT_HECTOR_CONSIS_LEVEL;
+      opConsisLvl = (writeOpConsLvl!=null && !writeOpConsLvl.isEmpty())?writeOpConsLvl:DEFAULT_HECTOR_CONSIS_LEVEL;
       ccl.setDefaultWriteConsistencyLevel(HConsistencyLevel.valueOf(opConsisLvl));
       LOG.debug("Hector write consistency configured to '" + opConsisLvl + "'.");
 


Mime
View raw message