gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis John McGibbney (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GORA-499) Potential NPE issue
Date Fri, 03 Feb 2017 08:34:52 GMT

     [ https://issues.apache.org/jira/browse/GORA-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Lewis John McGibbney updated GORA-499:
--------------------------------------
    Fix Version/s: 0.7

> Potential NPE issue
> -------------------
>
>                 Key: GORA-499
>                 URL: https://issues.apache.org/jira/browse/GORA-499
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: gora-cassandra
>            Reporter: JC
>            Priority: Minor
>             Fix For: 0.7
>
>
> 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.
> {code: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;
> {code}
> 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!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message