Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 71761 invoked from network); 18 Nov 2004 14:19:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Nov 2004 14:19:34 -0000 Received: (qmail 94333 invoked by uid 500); 18 Nov 2004 14:19:31 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 94208 invoked by uid 500); 18 Nov 2004 14:19:30 -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 94144 invoked by uid 99); 18 Nov 2004 14:19:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 18 Nov 2004 06:19:26 -0800 Received: (qmail 27908 invoked from network); 18 Nov 2004 14:19:25 -0000 Received: from localhost (HELO nagoya) (127.0.0.1) by nagoya.betaversion.org with SMTP; 18 Nov 2004 14:19:25 -0000 Message-ID: <1571381446.1100787565114.JavaMail.apache@nagoya> Date: Thu, 18 Nov 2004 06:19:25 -0800 (PST) From: "Shreyas Kaushik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-33) Connection.setTypeMap throws unimplemented exception with empty map In-Reply-To: <1351171660.1097095791911.JavaMail.apache@nagoya> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N [ http://nagoya.apache.org/jira/browse/DERBY-33?page=comments#action_55614 ] Shreyas Kaushik commented on DERBY-33: -------------------------------------- I wrote a sample program using JdbcRowSet and found it to working perfectly with Derby. I am attaching the sample program here. It *did not* throw up the error JdbcRowSet (setTypeMap) : null. This error appears becaus eof the fix suggested in the link that causes a NPE if the map is null ( map.isEmpty()) causes a NPE that appears as this problem. My suggested fix to handle this problem is : if((map != null)) { if(!(map.isEmpty())) throw Util.notImplemented(); } I also did not get the error when the connection is actually closed. The right way to clean up things when using the JdbcRowSet is to call close() method in the JdbcRowSet and then call the close method on the connection. Please have a look at this and let me know. thanks Shreyas > Connection.setTypeMap throws unimplemented exception with empty map > ------------------------------------------------------------------- > > Key: DERBY-33 > URL: http://nagoya.apache.org/jira/browse/DERBY-33 > Project: Derby > Type: Bug > Components: JDBC > Versions: 10.0.2.0 > Reporter: Daniel John Debrunner > Priority: Minor > > With some other unimplemented methods Derby accepts a default value or value that is in effect a no-op. In this case an empty map should be accepted. May want to apply the same logi to other JDBC methods that take a type map. > Original bug discovered by Edward Rayl > http://nagoya.apache.org/eyebrowse/ReadMsg?listName=derby-user@db.apache.org&msgNo=43 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://nagoya.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira