Cleanup patch: Change from Vector/Hashtable to ArrayList/HashMap

From: Mikko Tiihonen <mikko(dot)tiihonen(at)nitorcreations(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Cleanup patch: Change from Vector/Hashtable to ArrayList/HashMap
Date: 2012-05-06 16:25:11
Message-ID: 4FA6A5E7.5000309@nitorcreations.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

-Mikko

Attachment Content-Type Size
0001-Change-all-usages-of-Vector-to-List-and-ArrayList.patch text/x-patch 0 bytes

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message dmp 2012-05-06 18:03:50 Re: Cleanup patch: Change from Vector/Hashtable to ArrayList/HashMap
Previous Message Shijun Kong 2012-05-04 18:30:17 Re: PGSimpleDataSource not support jdbc url