You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/03/01 20:49:45 UTC

[jira] [Commented] (GEODE-2551) Possible bugs in the source code

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

ASF subversion and git services commented on GEODE-2551:
--------------------------------------------------------

Commit 8b94e2ec2dc1192e96fc822b4b3a49561a76b2dc in geode's branch refs/heads/develop from [~amb]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=8b94e2e ]

GEODE-2551 Fix code issues found by AppChecker

This closes #408


> 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)