You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Anthony Baker (JIRA)" <ji...@apache.org> on 2017/06/17 18:04:34 UTC

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

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

Anthony Baker closed GEODE-2551.
--------------------------------

> Possible bugs in the source code
> --------------------------------
>
>                 Key: GEODE-2551
>                 URL: https://issues.apache.org/jira/browse/GEODE-2551
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh, serialization
>            Reporter: AppChecker
>            Assignee: Anthony Baker
>             Fix For: 1.2.0
>
>
> 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.4.14#64029)