gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-499) Potential NPE issue
Date Sat, 28 Jan 2017 06:47:24 GMT

    [ https://issues.apache.org/jira/browse/GORA-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843936#comment-15843936

ASF GitHub Bot commented on GORA-499:

GitHub user lifove opened a pull request:


    GORA-499 Fix for a potential NPE


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lifove/gora master

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #92
commit 33bab4a3e4711028adc30766b0cc797dab4604ba
Author: JC <jc@lifove.net>
Date:   2017-01-28T06:44:00Z

    GORA-499 Fix for a potential NPE


> Potential NPE issue
> -------------------
>                 Key: GORA-499
>                 URL: https://issues.apache.org/jira/browse/GORA-499
>             Project: Apache Gora
>          Issue Type: Bug
>            Reporter: Jaechang Nam
>            Priority: Minor
> Dear Gora developers
> In recent got repositiry, I've found the following lines in gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java.
> <pre>
> 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;
> </pre>
> It seems 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

View raw message