Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 2536 invoked from network); 21 Mar 2011 01:05:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Mar 2011 01:05:28 -0000 Received: (qmail 30717 invoked by uid 500); 21 Mar 2011 01:05:27 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 30688 invoked by uid 500); 21 Mar 2011 01:05:27 -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 30681 invoked by uid 99); 21 Mar 2011 01:05:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 01:05:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 01:05:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 19D7A401E19 for ; Mon, 21 Mar 2011 01:05:06 +0000 (UTC) Date: Mon, 21 Mar 2011 01:05:06 +0000 (UTC) From: "Dave Brosius (JIRA)" To: derby-dev@db.apache.org Message-ID: <1267606783.250.1300669506102.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1411272429.194.1300667706107.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DERBY-5143) Remove unnecessary copying of the map in getTypeMap() 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-5143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008998#comment-13008998 ] Dave Brosius commented on DERBY-5143: ------------------------------------- It seems to me like the entire NetConnection40.getTypeMap method can be removed, as the parent class always just returns an empty Map. In fact, Connection.getTypeMap, could just return a static field Map defined as static final Map typeMap = Collections.unmodfiableSet(new HashSet()); > Remove unnecessary copying of the map in getTypeMap() > ----------------------------------------------------- > > Key: DERBY-5143 > URL: https://issues.apache.org/jira/browse/DERBY-5143 > Project: Derby > Issue Type: Improvement > Components: JDBC > Affects Versions: 10.8.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: getTypeMap-warning.diff > > > The JDBC 4.0 Connection classes implement getTypeMap() by calling super.getTypeMap() and copying the resulting map. This is done to prevent an unchecked compiler warning that we would see if we simply returned super.getTypeMap() in this method. It would be cheaper and simpler to return super.getTypeMap() and ignore the warning. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira