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 2A534DB3C for ; Wed, 12 Dec 2012 19:36:21 +0000 (UTC) Received: (qmail 21546 invoked by uid 500); 12 Dec 2012 19:36:20 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 21413 invoked by uid 500); 12 Dec 2012 19:36:20 -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 21246 invoked by uid 99); 12 Dec 2012 19:36:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 19:36:20 +0000 Date: Wed, 12 Dec 2012 19:36:20 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-3069) Derby does not resolve functions bound to methods with varargs. 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-3069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Hillegas updated DERBY-3069: --------------------------------- Attachment: derby-3069-06-ab-fixBugs.diff Attaching derby-3069-06-ab-fixBugs.diff. This patch fixes various bugs in the binding and code-generating of varargs calls. I am running regression tests now. This patch fixes the following bugs: 1) Primitive vararg args were being treated as the correponding wrapper types. 2) OUT and INOUT varargs to procedures needed extra logic to handle the extra array level added by OUT and INOUT args. In addition, this patch adds a number of tests. Touches the following files: ----------------- M java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java M java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java Changes to handle primitive varargs and OUT/INOUT procedure parameters. ----------------- M java/testing/org/apache/derbyTesting/functionTests/tests/lang/VarargsRoutines.java M java/testing/org/apache/derbyTesting/functionTests/tests/lang/VarargsTest.java More tests. > Derby does not resolve functions bound to methods with varargs. > --------------------------------------------------------------- > > Key: DERBY-3069 > URL: https://issues.apache.org/jira/browse/DERBY-3069 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0, 10.3.1.4 > Reporter: Rick Hillegas > Assignee: Rick Hillegas > Labels: derby_triage10_10 > Attachments: derby-3069-01-varargs-aa.diff, derby-3069-01-varargs-ab.diff, derby-3069-02-backout.diff, derby-3069-03-aa-varargsSyntax.diff, derby-3069-03-ab-varargsSyntax.diff, derby-3069-04-aa-shortenRoutineNamesInUpgradeTest.diff, derby-3069-05-aa-executeVarargs.diff, derby-3069-06-ab-fixBugs.diff, Varargs.html, z.java, z.sql > > > Varargs were added in Java 5. It would be nice if Derby let you invoke a function bound to a method with a variable length argument list. The Reference Guide states a small number of restrictions for methods which can be invoked as Derby functions: They must be public, static, and not have arguments which are long datatypes. I see no reason that Derby shouldn't be able to resolve and invoke functions which are bound to methods which don't suffer these limitations but which have variable argument lists. -- 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