Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 39391 invoked from network); 22 Nov 2004 03:54:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Nov 2004 03:54:44 -0000 Received: (qmail 1364 invoked by uid 500); 22 Nov 2004 03:54:41 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 1334 invoked by uid 500); 22 Nov 2004 03:54:41 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 1322 invoked by uid 99); 22 Nov 2004 03:54:41 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [192.18.42.13] (HELO nwkea-mail-1.sun.com) (192.18.42.13) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 21 Nov 2004 19:54:37 -0800 Received: from phys-biff-1 ([129.158.227.36]) by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id iAM3qx6S017366 for ; Sun, 21 Nov 2004 19:54:33 -0800 (PST) Received: from conversion-daemon.biff-mail1.india.sun.com by biff-mail1.india.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0I7K00G01AJNMX@biff-mail1.india.sun.com> (original mail from Shreyas.Kaushik@Sun.COM) for derby-dev@db.apache.org; Mon, 22 Nov 2004 09:24:12 +0530 (IST) Received: from Sun.COM (lilly.India.Sun.COM [129.158.229.246]) by biff-mail1.india.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0I7K00A3ZAUCX8@biff-mail1.india.sun.com>; Mon, 22 Nov 2004 09:24:12 +0530 (IST) Date: Mon, 22 Nov 2004 09:23:12 +0530 From: Shreyas Kaushik Subject: Re: [PATCH] For the open issue with key Derby-33 In-reply-to: <419E2B42.7060209@debrunners.com> To: Daniel John Debrunner Cc: Derby Development Reply-to: Shreyas.Kaushik@Sun.COM Message-id: <41A162A8.3050504@Sun.COM> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20040414 References: <419DDC51.80704@Sun.COM> <419E2B42.7060209@debrunners.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Dan, Just to clarify the fix should take care of the conditions the following way : null Map --> throw a SQLException empty Map --> no-op non-empty Map --> throw notImplemented. Please confirm. I will fix it accordingly. thanks Shreyas Daniel John Debrunner wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Shreyas Kaushik wrote: > > >>Hi, >> >> I am attaching the patch to fix the Open issue with key *Derby-33* >>having the description *Connection.setTypeMap throws unimplemented >>exception with empty map*. >> >> This patch takes care of proper handling of the empty map condition. >> >> I have also updated JIRA with my comments on 18-Nov-2004. >> >>thanks >>Shreyas >> >> >>------------------------------------------------------------------------ >> >>Index: java/engine/org/apache/derby/impl/jdbc/EmbedConnection20.java >>=================================================================== >>--- java/engine/org/apache/derby/impl/jdbc/EmbedConnection20.java > > (revision 105806) > >>+++ java/engine/org/apache/derby/impl/jdbc/EmbedConnection20.java > > (working copy) > >>@@ -109,7 +109,10 @@ >> * @exception SQLException Feature not implemented for now. >> */ >> public void setTypeMap(java.util.Map map) throws SQLException { >>- throw Util.notImplemented(); >>+ if((map != null)) { >>+ if(!(map.isEmpty())) >>+ throw Util.notImplemented(); >>+ } >> } >> >> /* > > > > Thanks for the patch, though I think the fix does not handle null > correctly. Passing in null should throw an exception, not be silently > ignored. > > See this message I sent yesterday. > > http://nagoya.apache.org/eyebrowse/ReadMsg?listName=derby-dev@db.apache.org&msgNo=950 > > Also I think this is a partial fix to Derby 33. Derby should be > consistent in empty map (and null) handling in other JDBC methods that > take a type Map (ie. getObject in ResultSet and CallableStatement). > > Dan. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.5 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFBnitCIv0S4qsbfuQRApHlAJ4zg43NoYl+7PBHZCv7Z4fKcfy0TQCfWtUY > 2+At27jA5xEDXOd043EPaJM= > =GsfY > -----END PGP SIGNATURE----- >