Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9D3A6200CAA for ; Sat, 17 Jun 2017 20:05:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9B337160BEF; Sat, 17 Jun 2017 18:05:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1597160BEA for ; Sat, 17 Jun 2017 20:05:30 +0200 (CEST) Received: (qmail 2357 invoked by uid 500); 17 Jun 2017 18:04:59 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 2158 invoked by uid 99); 17 Jun 2017 18:04:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Jun 2017 18:04:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 51BF31892E8 for ; Sat, 17 Jun 2017 18:04:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Kf8hjwoWm_XI for ; Sat, 17 Jun 2017 18:04:57 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 412C262639 for ; Sat, 17 Jun 2017 18:04:39 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 07ABEE06C4 for ; Sat, 17 Jun 2017 18:04:39 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1E6AD2426A for ; Sat, 17 Jun 2017 18:04:34 +0000 (UTC) Date: Sat, 17 Jun 2017 18:04:34 +0000 (UTC) From: "Anthony Baker (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (GEODE-2551) Possible bugs in the source code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 17 Jun 2017 18:05:31 -0000 [ 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)