Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Dear Gora developers
In recent git repository, I've found the following lines in gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java.
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;
It seems, if readOpConsLvl or writeOpConsLvl is null, there could be NullPointerException as the comparison operator is "||" rather using "&&". I have no idea if this is an actual bug but just reporting. Thanks!
Attachments
Issue Links
- links to