Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id C65951B8C087 for ; Sun, 6 May 2012 15:09:07 -0300 (ADT) Received: from smtp.lincoln.k12.mt.us ([216.146.104.103] helo=outbound.vnet-inc.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SR5t7-00005j-OX for pgsql-jdbc@postgresql.org; Sun, 06 May 2012 18:09:06 +0000 Received: from [192.168.157.132] (unknown [76.75.27.41]) by outbound.vnet-inc.com (Postfix) with ESMTP id 9B2375A1A for ; Sun, 6 May 2012 12:08:31 -0600 (MDT) Message-ID: <4FA6BD06.4060308@ttc-cmc.net> Date: Sun, 06 May 2012 12:03:50 -0600 From: dmp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.13) Gecko/20100914 SeaMonkey/2.0.8 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Cleanup patch: Change from Vector/Hashtable to ArrayList/HashMap Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/12 X-Sequence-Number: 22912 Mikko Tiihonen wrote: > Hi, > > Here are two small cleanup patches. > > First one replaces all Vector references with List (usage) and ArrayList > (creation). > Second replaces all Hashtable references with Map (usage) and HashMap > (creation). > > Reasons: > * Theoretically faster since the ArrayList/HashMap are not synchronized > * Using interfaces makes changing of List/Map implementations easier at > later time > * Vector/Hashtable were deprecated already in Java 1.2 My JDK 6 documentation gives no indication that either Vector or Hashtable as being deprecated. Rather them being retrofitted into the Collectionss Framework at 1.2. The main difference being that as you said they are synchronized, which a developer may wish to have for that type of data structure. danap. > > -Mikko