[ 
https://issues.apache.org/jira/browse/GEODE-2551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884914#comment-15884914
 ] 

ASF GitHub Bot commented on GEODE-2551:
---------------------------------------

GitHub user metatype opened a pull request:

    https://github.com/apache/geode/pull/408

    GEODE-2551 Fix code issues found by AppChecker

    

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

    $ git pull https://github.com/metatype/incubator-geode feature/GEODE-2551

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

    https://github.com/apache/geode/pull/408.patch

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

    This closes #408
    
----
commit 92c9ad1e2df8d11b970e08be7b868294300434a4
Author: Anthony Baker <aba...@apache.org>
Date:   2017-02-26T21:20:34Z

    GEODE-2551 Fix code issues found by AppChecker

----


> Possible bugs in the source code
> --------------------------------
>
>                 Key: GEODE-2551
>                 URL: https://issues.apache.org/jira/browse/GEODE-2551
>             Project: Geode
>          Issue Type: Bug
>            Reporter: AppChecker
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php]
> It found several possible defects in the source code:
> 1) 
> https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/management/internal/cli/parser/ParserUtils.java#L96
> {code:java}
> if ((split[i].endsWith("\"") && split[i].endsWith("\""))
>             || (split[i].startsWith("\'") && split[i].endsWith("\'"))) {
> {code}
> {noformat}split[i].endsWith("\"") {noformat} is checked twice.
> Probably it should be:
> {code:java}
> if ((split[i].startsWith("\"") && split[i].endsWith("\""))
>             || (split[i].startsWith("\'") && split[i].endsWith("\'"))) {
> {code}
> 2) 
> https://github.com/apache/geode/blob/6e5013102927099a725282b6bad5d64a79152fab/geode-core/src/test/java/org/apache/geode/cache/query/dunit/SelectStarQueryDUnitTest.java#L1384
> https://github.com/apache/geode/blob/6e5013102927099a725282b6bad5d64a79152fab/geode-core/src/test/java/org/apache/geode/cache/query/dunit/SelectStarQueryDUnitTest.java#L1444
> {code:java}
> else if (rs instanceof PortfolioPdx || rs instanceof PortfolioPdx) {
> {code}
> rs is checked twice
> 3) 
> https://github.com/apache/geode/blob/8bf39571471642beaaa36c9626a61a90bd3803c2/geode-core/src/main/java/org/apache/geode/management/internal/cli/util/JsonUtil.java#L388
> {code:java}
>     } else if (klass.isAssignableFrom(Float.class) || 
> klass.isAssignableFrom(Float.class)) {
> {code}
> klass.isAssignableFrom(Float.class)  is checked twcie



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

Reply via email to