Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85516107C9 for ; Wed, 28 Aug 2013 12:10:55 +0000 (UTC) Received: (qmail 53175 invoked by uid 500); 28 Aug 2013 12:10:55 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 53076 invoked by uid 500); 28 Aug 2013 12:10:55 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 52515 invoked by uid 99); 28 Aug 2013 12:10:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Aug 2013 12:10:53 +0000 Date: Wed, 28 Aug 2013 12:10:53 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-6318) Simplify setting of possibly null parameters in XPLAIN descriptors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-6318: -------------------------------------- Issue & fix info: Patch Available All tests passed. > Simplify setting of possibly null parameters in XPLAIN descriptors > ------------------------------------------------------------------ > > Key: DERBY-6318 > URL: https://issues.apache.org/jira/browse/DERBY-6318 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.11.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Trivial > Attachments: d6318-1a.diff > > > I noticed that the various XPLAIN descriptor classes need to set lots of numeric parameters on a PreparedStatement, using the following idiom to allow null values: > if (parse_time != null) > ps.setLong(2, parse_time.longValue()); > else > ps.setNull(2, Types.BIGINT); > The same thing could have been achieved by using a single call to setObject(), like this: > ps.setObject(2, parse_time, Types.BIGINT); > This would make the methods shorter and clearer. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira