Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 56834 invoked from network); 28 Mar 2006 12:25:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Mar 2006 12:25:26 -0000 Received: (qmail 83487 invoked by uid 500); 28 Mar 2006 12:25:13 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 83259 invoked by uid 500); 28 Mar 2006 12:25:12 -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 83250 invoked by uid 99); 28 Mar 2006 12:25:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2006 04:25:12 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.34] (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2006 04:25:11 -0800 Received: from phys-epost-1 ([129.159.136.14]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id k2SCOoQj016813 for ; Tue, 28 Mar 2006 05:24:50 -0700 (MST) Received: from conversion-daemon.epost-mail1.sweden.sun.com by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IWU0090178TAM@epost-mail1.sweden.sun.com> (original mail from Andreas.Korneliussen@Sun.COM) for derby-dev@db.apache.org; Tue, 28 Mar 2006 14:24:50 +0200 (MEST) Received: from [129.159.112.247] (khepri35.Norway.Sun.COM [129.159.112.247]) by epost-mail1.sweden.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0IWU00J2C7TDYO@epost-mail1.sweden.sun.com> for derby-dev@db.apache.org; Tue, 28 Mar 2006 14:24:50 +0200 (MEST) Date: Tue, 28 Mar 2006 14:24:49 +0200 From: Andreas Korneliussen Subject: Re: [jira] Updated: (DERBY-1146) Verify that JDBC4 signatures satisfied In-reply-to: <44292893.2060005@Sun.COM> To: derby-dev@db.apache.org Reply-to: Andreas.Korneliussen@Sun.COM Message-id: <44292B11.9090907@sun.com> Organization: Sun Microsystems MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Thunderbird 1.5 (X11/20060113) References: <1315148802.1143544280659.JavaMail.jira@ajax> <442922F2.4080001@sun.com> <44292893.2060005@Sun.COM> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Anurag Shekhar wrote: > > >> Also, I think this also indicates that we should consider using >> delegation instead of inheritance for code reuse. >> >> Andreas >> > I didn't get it, how does it indicates that ? > anurag Because now we are fooling the compiler to think that EmbedXXX40 classes implement java.sql.XXX interface since it inherits from a class which has declared that it implements it. The problem is that the base class is compiled against an old runtime library, and we lose the compile time checks for the new methods. This way of doing things was not introduced as part of JDBC4, it also applies to JDBC3 vs JDBC2. So basically a developer may accidentally change the signature of a JDBC3 method, and the compiler will not complain. You will only detect the error in runtime, i.e through tests. Andreas