incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1130475 [5/6] - in /incubator/lcf/trunk: ./ connectors/activedirectory/ connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ connectors/documentum/ connectors/documentum/connecto...
Date Thu, 02 Jun 2011 10:32:07 GMT
Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java Thu Jun  2 10:32:04 2011
@@ -79,25 +79,25 @@ public class DBInterfaceMySQL extends Da
   * invalidated.
   *@param parameterMap is the map of column name/values to write.
   */
-  public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
+  public void performInsert(String tableName, Map<String,Object> parameterMap, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    ArrayList paramArray = new ArrayList();
+    List paramArray = new ArrayList();
 
-    StringBuffer bf = new StringBuffer();
+    StringBuilder bf = new StringBuilder();
     bf.append("INSERT INTO ");
     bf.append(tableName);
     bf.append(" (") ;
 
-    StringBuffer values = new StringBuffer(" VALUES (");
+    StringBuilder values = new StringBuilder(" VALUES (");
 
     // loop for cols
-    Iterator it = parameterMap.entrySet().iterator();
+    Iterator<Map.Entry<String,Object>> it = parameterMap.entrySet().iterator();
     boolean first = true;
     while (it.hasNext())
     {
-      Map.Entry e = (Map.Entry)it.next();
-      String key = (String)e.getKey();
+      Map.Entry<String,Object> e = it.next();
+      String key = e.getKey();
 
       Object o = e.getValue();
       if (o != null)
@@ -132,23 +132,24 @@ public class DBInterfaceMySQL extends Da
   *@param whereClause is the where clause describing the match (including the WHERE), or null if none.
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
-  public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
+  public void performUpdate(String tableName, Map<String,Object> parameterMap, String whereClause,
+    List whereParameters, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    ArrayList paramArray = new ArrayList();
+    List paramArray = new ArrayList();
 
-    StringBuffer bf = new StringBuffer();
+    StringBuilder bf = new StringBuilder();
     bf.append("UPDATE ");
     bf.append(tableName);
     bf.append(" SET ") ;
 
     // loop for parameters
-    Iterator it = parameterMap.entrySet().iterator();
+    Iterator<Map.Entry<String,Object>> it = parameterMap.entrySet().iterator();
     boolean first = true;
     while (it.hasNext())
     {
-      Map.Entry e = (Map.Entry)it.next();
-      String key = (String)e.getKey();
+      Map.Entry<String,Object> e = it.next();
+      String key = e.getKey();
 
       Object o = e.getValue();
 
@@ -197,10 +198,10 @@ public class DBInterfaceMySQL extends Da
   *@param whereClause is the where clause describing the match (including the WHERE), or null if none.
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
-  public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
+  public void performDelete(String tableName, String whereClause, List whereParameters, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    StringBuffer bf = new StringBuffer();
+    StringBuilder bf = new StringBuilder();
     bf.append("DELETE FROM ");
     bf.append(tableName);
     if (whereClause != null)
@@ -223,18 +224,18 @@ public class DBInterfaceMySQL extends Da
   * layer.
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
-  public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
+  public void performCreate(String tableName, Map<String,ColumnDescription> columnMap, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
+    StringBuilder queryBuffer = new StringBuilder("CREATE TABLE ");
     queryBuffer.append(tableName);
     queryBuffer.append('(');
-    Iterator iter = columnMap.keySet().iterator();
+    Iterator<String> iter = columnMap.keySet().iterator();
     boolean first = true;
     while (iter.hasNext())
     {
-      String columnName = (String)iter.next();
-      ColumnDescription cd = (ColumnDescription)columnMap.get(columnName);
+      String columnName = iter.next();
+      ColumnDescription cd = columnMap.get(columnName);
       if (!first)
         queryBuffer.append(',');
       else
@@ -277,7 +278,8 @@ public class DBInterfaceMySQL extends Da
   *@param columnDeleteList is the list of column names to delete.
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
-  public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
+  public void performAlter(String tableName, Map<String,ColumnDescription> columnMap,
+    Map<String,ColumnDescription> columnModifyMap, List<String> columnDeleteList,
     StringSet invalidateKeys)
     throws ManifoldCFException
   {
@@ -290,14 +292,14 @@ public class DBInterfaceMySQL extends Da
   *@param columnList is the list of columns that need to be included
   * in the index, in order.
   */
-  public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
+  public void addTableIndex(String tableName, boolean unique, List<String> columnList)
     throws ManifoldCFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
     while (i < columns.length)
     {
-      columns[i] = (String)columnList.get(i);
+      columns[i] = columnList.get(i);
       i++;
     }
     performAddIndex(null,tableName,new IndexDescription(unique,columns));
@@ -318,7 +320,7 @@ public class DBInterfaceMySQL extends Da
     if (indexName == null)
       // Build an index name
       indexName = "I"+IDFactory.make(context);
-    StringBuffer queryBuffer = new StringBuffer("CREATE ");
+    StringBuilder queryBuffer = new StringBuilder("CREATE ");
     if (description.getIsUnique())
       queryBuffer.append("UNIQUE ");
     queryBuffer.append("INDEX ");
@@ -387,7 +389,7 @@ public class DBInterfaceMySQL extends Da
   {
     // Connect to super database
     Database masterDatabase = new Database(context,_url+"mysql",_driver,"mysql",adminUserName,adminPassword);
-    ArrayList list = new ArrayList();
+    List list = new ArrayList();
     list.add("utf8");
     masterDatabase.executeQuery("CREATE DATABASE "+databaseName+" CHARACTER SET ?",list,
       null,invalidateKeys,null,false,0,null,null);
@@ -420,7 +422,7 @@ public class DBInterfaceMySQL extends Da
   *@param params are the parameterized values, if needed.
   *@param invalidateKeys are the cache keys to invalidate.
   */
-  public void performModification(String query, ArrayList params, StringSet invalidateKeys)
+  public void performModification(String query, List params, StringSet invalidateKeys)
     throws ManifoldCFException
   {
     executeQuery(query,params,null,invalidateKeys,null,false,0,null,null);
@@ -432,12 +434,12 @@ public class DBInterfaceMySQL extends Da
   *@param queryClass is the name of the query class, or null.
   *@return a map of column names and ColumnDescription objects, describing the schema.
   */
-  public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
+  public Map<String,ColumnDescription> getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException
   {
     IResultSet set = performQuery("DESCRIBE "+tableName,null,cacheKeys,queryClass);
     // Digest the result
-    HashMap rval = new HashMap();
+    Map<String,ColumnDescription> rval = new HashMap<String,ColumnDescription>();
     int i = 0;
     while (i < set.getRowCount())
     {
@@ -458,7 +460,7 @@ public class DBInterfaceMySQL extends Da
   *@param queryClass is the name of the query class, or null.
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
-  public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
+  public Map<String,IndexDescription> getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException
   {
     // MHL
@@ -499,7 +501,7 @@ public class DBInterfaceMySQL extends Da
   * or null if no LRU behavior desired.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException
   {
     return executeQuery(query,params,cacheKeys,null,queryClass,true,-1,null,null);
@@ -515,7 +517,7 @@ public class DBInterfaceMySQL extends Da
   *@param returnLimit is a description of how to limit the return result, or null if no limit.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
     throws ManifoldCFException
   {
@@ -533,7 +535,7 @@ public class DBInterfaceMySQL extends Da
   *@param returnLimit is a description of how to limit the return result, or null if no limit.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
     throws ManifoldCFException
   {
@@ -575,7 +577,7 @@ public class DBInterfaceMySQL extends Da
   */
   public String constructOffsetLimitClause(int offset, int limit)
   {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     if (offset != 0)
       sb.append("OFFSET ").append(Integer.toString(offset));
     if (limit != -1)
@@ -591,15 +593,16 @@ public class DBInterfaceMySQL extends Da
   * This filter wraps a query and returns a new query whose results are similar to POSTGRESQL's DISTINCT-ON feature.
   * Specifically, for each combination of the specified distinct fields in the result, only the first such row is included in the final
   * result.
-  *@param outputParameters is a blank arraylist into which to put parameters.  Null may be used if the baseParameters parameter is null.
+  *@param outputParameters is a blank list into which to put parameters.  Null may be used if the baseParameters parameter is null.
   *@param baseQuery is the base query, which is another SELECT statement, without parens,
   * e.g. "SELECT ..."
   *@param baseParameters are the parameters corresponding to the baseQuery.
   *@param distinctFields are the fields to consider to be distinct.  These should all be keys in otherFields below.
   *@param otherFields are the rest of the fields to return, keyed by the AS name, value being the base query column value, e.g. "value AS key"
-  *@return a revised query that performs the necessary DISTINCT ON operation.  The arraylist outputParameters will also be appropriately filled in.
+  *@return a revised query that performs the necessary DISTINCT ON operation.  The list outputParameters will also be appropriately filled in.
   */
-  public String constructDistinctOnClause(ArrayList outputParameters, String baseQuery, ArrayList baseParameters, String[] distinctFields, Map otherFields)
+  public String constructDistinctOnClause(List outputParameters, String baseQuery, List baseParameters,
+    String[] distinctFields, Map<String,String> otherFields)
   {
     // I don't know whether MySql supports this functionality or not.
     // MHL
@@ -607,13 +610,13 @@ public class DBInterfaceMySQL extends Da
     if (baseParameters != null)
       outputParameters.addAll(baseParameters);
 
-    StringBuffer sb = new StringBuffer("SELECT ");
+    StringBuilder sb = new StringBuilder("SELECT ");
     boolean needComma = false;
-    Iterator iter = otherFields.keySet().iterator();
+    Iterator<String> iter = otherFields.keySet().iterator();
     while (iter.hasNext())
     {
-      String fieldName = (String)iter.next();
-      String columnValue = (String)otherFields.get(fieldName);
+      String fieldName = iter.next();
+      String columnValue = otherFields.get(fieldName);
       if (needComma)
         sb.append(",");
       needComma = true;

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfacePostgreSQL.java Thu Jun  2 10:32:04 2011
@@ -48,22 +48,22 @@ public class DBInterfacePostgreSQL exten
   protected int serializableDepth = 0;
 
   // This is where we keep track of tables that we need to analyze on transaction exit
-  protected ArrayList tablesToAnalyze = new ArrayList();
+  protected List<String> tablesToAnalyze = new ArrayList<String>();
 
   // Keep track of tables to reindex on transaction exit
-  protected ArrayList tablesToReindex = new ArrayList();
+  protected List<String> tablesToReindex = new ArrayList<String>();
 
   // This is where we keep temporary table statistics, which accumulate until they reach a threshold, and then are added into shared memory.
   
   /** Accumulated reindex statistics.  This map is keyed by the table name, and contains TableStatistics values. */
-  protected static Map currentReindexStatistics = new HashMap();
+  protected static Map<String,TableStatistics> currentReindexStatistics = new HashMap<String,TableStatistics>();
   /** Table reindex thresholds, as read from configuration information.  Keyed by table name, contains Integer values. */
-  protected static Map reindexThresholds = new HashMap();
+  protected static Map<String,Integer> reindexThresholds = new HashMap<String,Integer>();
   
   /** Accumulated analyze statistics.  This map is keyed by the table name, and contains TableStatistics values. */
-  protected static Map currentAnalyzeStatistics = new HashMap();
+  protected static Map<String,TableStatistics> currentAnalyzeStatistics = new HashMap<String,TableStatistics>();
   /** Table analyze thresholds, as read from configuration information.  Keyed by table name, contains Integer values. */
-  protected static Map analyzeThresholds = new HashMap();
+  protected static Map<String,Integer> analyzeThresholds = new HashMap<String,Integer>();
   
   /** The number of inserts, deletes, etc. before we update the shared area. */
   protected static final int commitThreshold = 100;
@@ -146,25 +146,25 @@ public class DBInterfacePostgreSQL exten
   * invalidated.
   *@param parameterMap is the map of column name/values to write.
   */
-  public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
+  public void performInsert(String tableName, Map<String,Object> parameterMap, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    ArrayList paramArray = new ArrayList();
+    List paramArray = new ArrayList();
 
-    StringBuffer bf = new StringBuffer();
+    StringBuilder bf = new StringBuilder();
     bf.append("INSERT INTO ");
     bf.append(tableName);
     bf.append(" (") ;
 
-    StringBuffer values = new StringBuffer(" VALUES (");
+    StringBuilder values = new StringBuilder(" VALUES (");
 
     // loop for cols
-    Iterator it = parameterMap.entrySet().iterator();
+    Iterator<Map.Entry<String,Object>> it = parameterMap.entrySet().iterator();
     boolean first = true;
     while (it.hasNext())
     {
-      Map.Entry e = (Map.Entry)it.next();
-      String key = (String)e.getKey();
+      Map.Entry<String,Object> e = it.next();
+      String key = e.getKey();
 
       Object o = e.getValue();
       if (o != null)
@@ -199,23 +199,24 @@ public class DBInterfacePostgreSQL exten
   *@param whereClause is the where clause describing the match (including the WHERE), or null if none.
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
-  public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
+  public void performUpdate(String tableName, Map<String,Object> parameterMap, String whereClause,
+    List whereParameters, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    ArrayList paramArray = new ArrayList();
+    List paramArray = new ArrayList();
 
-    StringBuffer bf = new StringBuffer();
+    StringBuilder bf = new StringBuilder();
     bf.append("UPDATE ");
     bf.append(tableName);
     bf.append(" SET ") ;
 
     // loop for parameters
-    Iterator it = parameterMap.entrySet().iterator();
+    Iterator<Map.Entry<String,Object>> it = parameterMap.entrySet().iterator();
     boolean first = true;
     while (it.hasNext())
     {
-      Map.Entry e = (Map.Entry)it.next();
-      String key = (String)e.getKey();
+      Map.Entry<String,Object> e = it.next();
+      String key = e.getKey();
 
       Object o = e.getValue();
 
@@ -264,10 +265,10 @@ public class DBInterfacePostgreSQL exten
   *@param whereClause is the where clause describing the match (including the WHERE), or null if none.
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
-  public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
+  public void performDelete(String tableName, String whereClause, List whereParameters, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    StringBuffer bf = new StringBuffer();
+    StringBuilder bf = new StringBuilder();
     bf.append("DELETE FROM ");
     bf.append(tableName);
     if (whereClause != null)
@@ -290,18 +291,18 @@ public class DBInterfacePostgreSQL exten
   * layer.
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
-  public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
+  public void performCreate(String tableName, Map<String,ColumnDescription> columnMap, StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    StringBuffer queryBuffer = new StringBuffer("CREATE TABLE ");
+    StringBuilder queryBuffer = new StringBuilder("CREATE TABLE ");
     queryBuffer.append(tableName);
     queryBuffer.append('(');
-    Iterator iter = columnMap.keySet().iterator();
+    Iterator<String> iter = columnMap.keySet().iterator();
     boolean first = true;
     while (iter.hasNext())
     {
-      String columnName = (String)iter.next();
-      ColumnDescription cd = (ColumnDescription)columnMap.get(columnName);
+      String columnName = iter.next();
+      ColumnDescription cd = columnMap.get(columnName);
       if (!first)
         queryBuffer.append(',');
       else
@@ -314,7 +315,7 @@ public class DBInterfacePostgreSQL exten
 
   }
 
-  protected static void appendDescription(StringBuffer queryBuffer, String columnName, ColumnDescription cd, boolean forceNull)
+  protected static void appendDescription(StringBuilder queryBuffer, String columnName, ColumnDescription cd, boolean forceNull)
   {
     queryBuffer.append(columnName);
     queryBuffer.append(' ');
@@ -349,7 +350,8 @@ public class DBInterfacePostgreSQL exten
   *@param columnDeleteList is the list of column names to delete.
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
-  public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
+  public void performAlter(String tableName, Map<String,ColumnDescription> columnMap,
+    Map<String,ColumnDescription> columnModifyMap, List<String> columnDeleteList,
     StringSet invalidateKeys)
     throws ManifoldCFException
   {
@@ -361,7 +363,7 @@ public class DBInterfacePostgreSQL exten
         int i = 0;
         while (i < columnDeleteList.size())
         {
-          String columnName = (String)columnDeleteList.get(i++);
+          String columnName = columnDeleteList.get(i++);
           performModification("ALTER TABLE ONLY "+tableName+" DROP "+columnName,null,invalidateKeys);
         }
       }
@@ -369,16 +371,16 @@ public class DBInterfacePostgreSQL exten
       // Do the modifies.  This involves renaming each column to a temp column, then creating a new one, then copying
       if (columnModifyMap != null)
       {
-        Iterator iter = columnModifyMap.keySet().iterator();
+        Iterator<String> iter = columnModifyMap.keySet().iterator();
         while (iter.hasNext())
         {
-          String columnName = (String)iter.next();
-          ColumnDescription cd = (ColumnDescription)columnModifyMap.get(columnName);
+          String columnName = iter.next();
+          ColumnDescription cd = columnModifyMap.get(columnName);
           String renameColumn = "__temp__";
           // Rename current column
           performModification("ALTER TABLE ONLY "+tableName+" RENAME "+columnName+" TO "+renameColumn,null,invalidateKeys);
           // Create new column
-          StringBuffer sb = new StringBuffer();
+          StringBuilder sb = new StringBuilder();
           appendDescription(sb,columnName,cd,true);
           performModification("ALTER TABLE ONLY "+tableName+" ADD "+sb.toString(),null,invalidateKeys);
           // Copy old data to new
@@ -394,12 +396,12 @@ public class DBInterfacePostgreSQL exten
       // Now, do the adds
       if (columnMap != null)
       {
-        Iterator iter = columnMap.keySet().iterator();
+        Iterator<String> iter = columnMap.keySet().iterator();
         while (iter.hasNext())
         {
-          String columnName = (String)iter.next();
-          ColumnDescription cd = (ColumnDescription)columnMap.get(columnName);
-          StringBuffer sb = new StringBuffer();
+          String columnName = iter.next();
+          ColumnDescription cd = columnMap.get(columnName);
+          StringBuilder sb = new StringBuilder();
           appendDescription(sb,columnName,cd,false);
           performModification("ALTER TABLE ONLY "+tableName+" ADD "+sb.toString(),null,invalidateKeys);
         }
@@ -442,14 +444,14 @@ public class DBInterfacePostgreSQL exten
   *@param columnList is the list of columns that need to be included
   * in the index, in order.
   */
-  public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
+  public void addTableIndex(String tableName, boolean unique, List<String> columnList)
     throws ManifoldCFException
   {
     String[] columns = new String[columnList.size()];
     int i = 0;
     while (i < columns.length)
     {
-      columns[i] = (String)columnList.get(i);
+      columns[i] = columnList.get(i);
       i++;
     }
     performAddIndex(null,tableName,new IndexDescription(unique,columns));
@@ -470,7 +472,7 @@ public class DBInterfacePostgreSQL exten
     if (indexName == null)
       // Build an index name
       indexName = "I"+IDFactory.make(context);
-    StringBuffer queryBuffer = new StringBuffer("CREATE ");
+    StringBuilder queryBuffer = new StringBuilder("CREATE ");
     if (description.getIsUnique())
       queryBuffer.append("UNIQUE ");
     queryBuffer.append("INDEX ");
@@ -525,14 +527,14 @@ public class DBInterfacePostgreSQL exten
     try
     {
       // Create user
-      ArrayList params = new ArrayList();
+      List params = new ArrayList();
       params.add(userName);
       IResultSet set = masterDatabase.executeQuery("SELECT * FROM pg_user WHERE usename=?",params,
         null,null,null,true,-1,null,null);
       if (set.getRowCount() == 0)
       {
         // We have to quote the password.  Due to a postgresql bug, parameters don't work for this field.
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("'");
         int i = 0;
         while (i < password.length())
@@ -629,7 +631,7 @@ public class DBInterfacePostgreSQL exten
   *@param params are the parameterized values, if needed.
   *@param invalidateKeys are the cache keys to invalidate.
   */
-  public void performModification(String query, ArrayList params, StringSet invalidateKeys)
+  public void performModification(String query, List params, StringSet invalidateKeys)
     throws ManifoldCFException
   {
     try
@@ -649,11 +651,11 @@ public class DBInterfacePostgreSQL exten
   *@return a map of column names and ColumnDescription objects, describing the schema, or null if the
   * table doesn't exist.
   */
-  public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
+  public Map<String,ColumnDescription> getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException
   {
-    StringBuffer query = new StringBuffer();
-    ArrayList list = new ArrayList();
+    StringBuilder query = new StringBuilder();
+    List list = new ArrayList();
     query.append("SELECT pg_attribute.attname AS \"Field\",");
     query.append("CASE pg_type.typname WHEN 'int2' THEN 'smallint' WHEN 'int4' THEN 'int'");
     query.append(" WHEN 'int8' THEN 'bigint' WHEN 'varchar' THEN 'varchar(' || pg_attribute.atttypmod-4 || ')'");
@@ -672,7 +674,7 @@ public class DBInterfacePostgreSQL exten
     if (set.getRowCount() == 0)
       return null;
     // Digest the result
-    HashMap rval = new HashMap();
+    Map<String,ColumnDescription> rval = new HashMap<String,ColumnDescription>();
     int i = 0;
     while (i < set.getRowCount())
     {
@@ -693,15 +695,15 @@ public class DBInterfacePostgreSQL exten
   *@param queryClass is the name of the query class, or null.
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
-  public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
+  public Map<String,IndexDescription> getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException
   {
-    Map rval = new HashMap();
+    Map<String,IndexDescription> rval = new HashMap<String,IndexDescription>();
 
     String query = "SELECT pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) AS indexdef "+
       "FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i "+
       "WHERE c.relname = ? AND c.oid = i.indrelid AND i.indexrelid = c2.oid";
-    ArrayList list = new ArrayList();
+    List list = new ArrayList();
     list.add(tableName);
     
     IResultSet result = performQuery(query,list,cacheKeys,queryClass);
@@ -738,7 +740,7 @@ public class DBInterfacePostgreSQL exten
       if (parenPosition == -1)
         throw new ManifoldCFException("Cannot parse index description: '"+indexdef+"'");
       parsePosition = parenPosition + 1;
-      ArrayList columns = new ArrayList();
+      List<String> columns = new ArrayList<String>();
       while (true)
       {
         int nextIndex = indexdef.indexOf(",",parsePosition);
@@ -762,7 +764,7 @@ public class DBInterfacePostgreSQL exten
       int j = 0;
       while (j < columnNames.length)
       {
-        columnNames[j] = (String)columns.get(j);
+        columnNames[j] = columns.get(j);
         j++;
       }
       rval.put(indexName,new IndexDescription(isUnique,columnNames));
@@ -801,7 +803,7 @@ public class DBInterfacePostgreSQL exten
   * or null if no LRU behavior desired.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException
   {
     try
@@ -824,7 +826,7 @@ public class DBInterfacePostgreSQL exten
   *@param returnLimit is a description of how to limit the return result, or null if no limit.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
     throws ManifoldCFException
   {
@@ -849,7 +851,7 @@ public class DBInterfacePostgreSQL exten
   *@param returnLimit is a description of how to limit the return result, or null if no limit.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
     throws ManifoldCFException
   {
@@ -885,7 +887,7 @@ public class DBInterfacePostgreSQL exten
   */
   public String constructSubstringClause(String column, String regularExpression, boolean caseInsensitive)
   {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     sb.append("SUBSTRING(");
     if (caseInsensitive)
       sb.append("LOWER(").append(column).append(")");
@@ -908,7 +910,7 @@ public class DBInterfacePostgreSQL exten
   */
   public String constructOffsetLimitClause(int offset, int limit)
   {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     if (offset != 0)
       sb.append("OFFSET ").append(Integer.toString(offset));
     if (limit != -1)
@@ -924,21 +926,22 @@ public class DBInterfacePostgreSQL exten
   * This filter wraps a query and returns a new query whose results are similar to POSTGRESQL's DISTINCT-ON feature.
   * Specifically, for each combination of the specified distinct fields in the result, only the first such row is included in the final
   * result.
-  *@param outputParameters is a blank arraylist into which to put parameters.  Null may be used if the baseParameters parameter is null.
+  *@param outputParameters is a blank list into which to put parameters.  Null may be used if the baseParameters parameter is null.
   *@param baseQuery is the base query, which is another SELECT statement, without parens,
   * e.g. "SELECT ..."
   *@param baseParameters are the parameters corresponding to the baseQuery.
   *@param distinctFields are the fields to consider to be distinct.  These should all be keys in otherFields below.
   *@param otherFields are the rest of the fields to return, keyed by the AS name, value being the base query column value, e.g. "value AS key"
-  *@return a revised query that performs the necessary DISTINCT ON operation.  The arraylist outputParameters will also be appropriately filled in.
+  *@return a revised query that performs the necessary DISTINCT ON operation.  The list outputParameters will also be appropriately filled in.
   */
-  public String constructDistinctOnClause(ArrayList outputParameters, String baseQuery, ArrayList baseParameters, String[] distinctFields, Map otherFields)
+  public String constructDistinctOnClause(List outputParameters, String baseQuery, List baseParameters,
+    String[] distinctFields, Map<String,String> otherFields)
   {
     // Copy arguments
     if (baseParameters != null)
       outputParameters.addAll(baseParameters);
 
-    StringBuffer sb = new StringBuffer("SELECT DISTINCT ON(");
+    StringBuilder sb = new StringBuilder("SELECT DISTINCT ON(");
     int i = 0;
     while (i < distinctFields.length)
     {
@@ -947,12 +950,12 @@ public class DBInterfacePostgreSQL exten
       sb.append(distinctFields[i++]);
     }
     sb.append(") ");
-    Iterator iter = otherFields.keySet().iterator();
+    Iterator<String> iter = otherFields.keySet().iterator();
     boolean needComma = false;
     while (iter.hasNext())
     {
-      String fieldName = (String)iter.next();
-      String columnValue = (String)otherFields.get(fieldName);
+      String fieldName = iter.next();
+      String columnValue = otherFields.get(fieldName);
       if (needComma)
         sb.append(",");
       needComma = true;
@@ -1075,13 +1078,13 @@ public class DBInterfacePostgreSQL exten
       int i = 0;
       while (i < tablesToAnalyze.size())
       {
-        analyzeTableInternal((String)tablesToAnalyze.get(i++));
+        analyzeTableInternal(tablesToAnalyze.get(i++));
       }
       tablesToAnalyze.clear();
       i = 0;
       while (i < tablesToReindex.size())
       {
-        reindexTableInternal((String)tablesToReindex.get(i++));
+        reindexTableInternal(tablesToReindex.get(i++));
       }
       tablesToReindex.clear();
     }
@@ -1109,7 +1112,7 @@ public class DBInterfacePostgreSQL exten
   }
   
   /** Abstract method for explaining a query */
-  protected void explainQuery(String query, ArrayList params)
+  protected void explainQuery(String query, List params)
     throws ManifoldCFException
   {
     IResultSet x = executeUncachedQuery("EXPLAIN "+query,params,true,
@@ -1118,7 +1121,7 @@ public class DBInterfacePostgreSQL exten
     while (k < x.getRowCount())
     {
       IResultRow row = x.getRow(k++);
-      Iterator iter = row.getColumns();
+      Iterator<String> iter = row.getColumns();
       String colName = (String)iter.next();
       Logging.db.warn(" Plan: "+row.getValue(colName).toString());
     }
@@ -1161,7 +1164,7 @@ public class DBInterfacePostgreSQL exten
     lockManager.enterWriteCriticalSection(tableStatisticsLock);
     try
     {
-      TableStatistics ts = (TableStatistics)currentAnalyzeStatistics.get(tableName);
+      TableStatistics ts = currentAnalyzeStatistics.get(tableName);
       // Lock this table's statistics files
       lockManager.enterWriteLock(tableStatisticsLock);
       try
@@ -1198,7 +1201,7 @@ public class DBInterfacePostgreSQL exten
     lockManager.enterWriteCriticalSection(tableStatisticsLock);
     try
     {
-      TableStatistics ts = (TableStatistics)currentReindexStatistics.get(tableName);
+      TableStatistics ts = currentReindexStatistics.get(tableName);
       // Lock this table's statistics files
       lockManager.enterWriteLock(tableStatisticsLock);
       try
@@ -1282,7 +1285,7 @@ public class DBInterfacePostgreSQL exten
     lockManager.enterWriteCriticalSection(tableStatisticsLock);
     try
     {
-      Integer threshold = (Integer)reindexThresholds.get(tableName);
+      Integer threshold = reindexThresholds.get(tableName);
       int reindexThreshold;
       if (threshold == null)
       {
@@ -1293,7 +1296,7 @@ public class DBInterfacePostgreSQL exten
       else
         reindexThreshold = threshold.intValue();
       
-      TableStatistics ts = (TableStatistics)currentReindexStatistics.get(tableName);
+      TableStatistics ts = currentReindexStatistics.get(tableName);
       if (ts == null)
       {
         ts = new TableStatistics();
@@ -1339,7 +1342,7 @@ public class DBInterfacePostgreSQL exten
     lockManager.enterWriteCriticalSection(tableStatisticsLock);
     try
     {
-      Integer threshold = (Integer)analyzeThresholds.get(tableName);
+      Integer threshold = analyzeThresholds.get(tableName);
       int analyzeThreshold;
       if (threshold == null)
       {
@@ -1350,7 +1353,7 @@ public class DBInterfacePostgreSQL exten
       else
         analyzeThreshold = threshold.intValue();
       
-      TableStatistics ts = (TableStatistics)currentAnalyzeStatistics.get(tableName);
+      TableStatistics ts = currentAnalyzeStatistics.get(tableName);
       if (ts == null)
       {
         ts = new TableStatistics();

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/Database.java Thu Jun  2 10:32:04 2011
@@ -100,7 +100,7 @@ public class Database
   }
   
   /** Abstract method for explaining a query */
-  protected void explainQuery(String query, ArrayList params)
+  protected void explainQuery(String query, List params)
     throws ManifoldCFException
   {
   }
@@ -137,7 +137,7 @@ public class Database
   *  Pass null if no limits are desired.
   * @return the resultset
   */
-  public IResultSet executeQuery(String query, ArrayList params, StringSet cacheKeys, StringSet invalidateKeys,
+  public IResultSet executeQuery(String query, List params, StringSet cacheKeys, StringSet invalidateKeys,
     String queryClass, boolean needResult, int maxReturn, ResultSpecification spec, ILimitChecker returnLimits)
     throws ManifoldCFException
   {
@@ -391,7 +391,7 @@ public class Database
   {
     protected Connection connection;
     protected String query;
-    protected ArrayList params;
+    protected List params;
     protected boolean bResults;
     protected int maxResults;
     protected ResultSpecification spec;
@@ -399,7 +399,7 @@ public class Database
     protected Throwable exception = null;
     protected IResultSet rval = null;
 
-    public ExecuteQueryThread(Connection connection, String query, ArrayList params, boolean bResults, int maxResults,
+    public ExecuteQueryThread(Connection connection, String query, List params, boolean bResults, int maxResults,
       ResultSpecification spec, ILimitChecker returnLimit)
     {
       super();
@@ -438,7 +438,7 @@ public class Database
   }
 
   /** Do query execution via a subthread, so the primary thread can be interrupted */
-  protected IResultSet executeViaThread(Connection connection, String query, ArrayList params, boolean bResults, int maxResults,
+  protected IResultSet executeViaThread(Connection connection, String query, List params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
     throws ManifoldCFException
   {
@@ -477,7 +477,7 @@ public class Database
   /** This method does NOT appear in any interface; it is here to
   * service the cache object.
   */
-  protected IResultSet executeUncachedQuery(String query, ArrayList params, boolean bResults, int maxResults,
+  protected IResultSet executeUncachedQuery(String query, List params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
     throws ManifoldCFException
   {
@@ -526,9 +526,9 @@ public class Database
   * @param query String the query string
   * @param bResults boolean whether to load the resultset or not
   * @param maxResults is the maximum number of results to load: -1 if all
-  * @param params ArrayList if params !=null, use preparedStatement
+  * @param params List if params !=null, use preparedStatement
   */
-  protected IResultSet execute(Connection connection, String query, ArrayList params, boolean bResults, int maxResults,
+  protected IResultSet execute(Connection connection, String query, List params, boolean bResults, int maxResults,
     ResultSpecification spec, ILimitChecker returnLimit)
     throws ManifoldCFException
   {
@@ -761,7 +761,7 @@ public class Database
   }
 
   // pass params to preparedStatement
-  protected static void loadPS(PreparedStatement ps, ArrayList data)
+  protected static void loadPS(PreparedStatement ps, List data)
     throws java.sql.SQLException, ManifoldCFException
   {
     if (data!=null)
@@ -820,7 +820,7 @@ public class Database
 
   /** Clean up parameters after query has been triggered.
   */
-  protected static void cleanupParameters(ArrayList data)
+  protected static void cleanupParameters(List data)
     throws ManifoldCFException
   {
     if (data != null)

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/QueryDescription.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/QueryDescription.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/QueryDescription.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/QueryDescription.java Thu Jun  2 10:32:04 2011
@@ -31,7 +31,7 @@ public class QueryDescription extends or
   // We don't want to hold onto the actual open database handle!
   protected String databaseName;
   protected String query;
-  protected ArrayList parameters;
+  protected List parameters;
   protected String criticalSectionName = null;
   protected String cacheClassName;
   protected StringSet keys;
@@ -39,7 +39,7 @@ public class QueryDescription extends or
   protected ResultSpecification spec;
   protected ILimitChecker returnLimit;
 
-  public QueryDescription(String databaseName, String query, ArrayList parameters,
+  public QueryDescription(String databaseName, String query, List parameters,
     String cacheClassName, StringSet cacheKeys, int maxReturn, ResultSpecification spec,
     ILimitChecker returnLimit)
   {
@@ -49,7 +49,7 @@ public class QueryDescription extends or
     this.parameters = null;
     if (parameters != null)
     {
-      this.parameters = (ArrayList)parameters.clone();
+      this.parameters = listClone(parameters);
     }
     keys = cacheKeys;
     this.maxReturn = maxReturn;
@@ -74,11 +74,11 @@ public class QueryDescription extends or
     return query;
   }
 
-  public ArrayList getParameters()
+  public List getParameters()
   {
     if (parameters == null)
       return null;
-    return (ArrayList)parameters.clone();
+    return listClone(parameters);
   }
 
   public int getMaxReturn()
@@ -186,7 +186,7 @@ public class QueryDescription extends or
   {
     if (criticalSectionName == null)
     {
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       if (databaseName != null)
         sb.append(databaseName);
       sb.append("-").append(getClass().getName()).append("-");
@@ -216,6 +216,16 @@ public class QueryDescription extends or
     return criticalSectionName;
   }
 
+  protected static List listClone(List list)
+  {
+    List rval = new ArrayList(list.size());
+    for (Object o : list)
+    {
+      rval.add(o);
+    }
+    return rval;
+  }
+  
 }
 
 

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RRow.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RRow.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RRow.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RRow.java Thu Jun  2 10:32:04 2011
@@ -27,7 +27,7 @@ public class RRow implements IResultRow
 {
   public static final String _rcsid = "@(#)$Id: RRow.java 988245 2010-08-23 18:39:35Z kwright $";
 
-  protected Map rowData = new HashMap();
+  protected Map<String,Object> rowData = new HashMap<String,Object>();
 
   public RRow()
   {
@@ -49,7 +49,7 @@ public class RRow implements IResultRow
   /** Obtain the set of columns for a row.
   @return an iterator that will list all the (String) column names stored in that row.
   */
-  public Iterator getColumns()
+  public Iterator<String> getColumns()
   {
     return rowData.keySet().iterator();
   }

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RSet.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RSet.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RSet.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/RSet.java Thu Jun  2 10:32:04 2011
@@ -26,7 +26,7 @@ public class RSet implements IResultSet
   public static final String _rcsid = "@(#)$Id: RSet.java 988245 2010-08-23 18:39:35Z kwright $";
 
   // Instance of a result
-  protected ArrayList _rows = new ArrayList();
+  protected List<IResultRow> rows = new ArrayList<IResultRow>();
 
   public RSet()
   {
@@ -36,7 +36,7 @@ public class RSet implements IResultSet
   */
   public void addRow(IResultRow m)
   {
-    _rows.add(m);
+    rows.add(m);
   }
 
   /** Get a specific row in the resultset.
@@ -45,7 +45,7 @@ public class RSet implements IResultSet
   */
   public IResultRow getRow(int rowNumber)
   {
-    return (IResultRow)_rows.get(rowNumber);
+    return rows.get(rowNumber);
   }
 
   /** Get the number of rows in this resultset.
@@ -53,7 +53,7 @@ public class RSet implements IResultSet
   */
   public int getRowCount()
   {
-    return _rows.size();
+    return rows.size();
   }
 
   /** Get an array of all the rows.
@@ -63,11 +63,11 @@ public class RSet implements IResultSet
   */
   public IResultRow[] getRows()
   {
-    IResultRow[] rval = new IResultRow[_rows.size()];
+    IResultRow[] rval = new IResultRow[rows.size()];
     int i = 0;
-    while (i < _rows.size())
+    while (i < rows.size())
     {
-      rval[i] = (IResultRow)_rows.get(i);
+      rval[i] = rows.get(i);
       i++;
     }
     return rval;

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigParams.java Thu Jun  2 10:32:04 2011
@@ -35,7 +35,7 @@ public class ConfigParams extends Config
   protected final static String ATTR_NAME = "name";
 
   // The parameter map (which stores name/value pairs also listed in the children)
-  protected HashMap params = new HashMap();
+  protected Map<String,String> params = new HashMap<String,String>();
 
   /** Constructor.
   */
@@ -48,14 +48,14 @@ public class ConfigParams extends Config
   *@param map is the initialized (mutable) map describing the name/value configuration parameters.
   * This method of setting up a ConfigParams object will go away when the parameters are all in XML.
   */
-  public ConfigParams(Map map)
+  public ConfigParams(Map<String,String> map)
   {
     super("configuration");
-    Iterator iter = map.keySet().iterator();
+    Iterator<String> iter = map.keySet().iterator();
     while (iter.hasNext())
     {
-      String key = (String)iter.next();
-      String value = (String)map.get(key);
+      String key = iter.next();
+      String value = map.get(key);
       ConfigNode cn = new ConfigNode(PARAMETER_TYPE);
       cn.setAttribute(ATTR_NAME,key);
       cn.setValue(value);
@@ -137,7 +137,7 @@ public class ConfigParams extends Config
   */
   public String getParameter(String key)
   {
-    return (String)params.get(key);
+    return params.get(key);
   }
 
   /** Get an obfuscated parameter value.

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java Thu Jun  2 10:32:04 2011
@@ -41,7 +41,7 @@ public class Configuration implements IH
   // The root node type
   protected String rootNodeLabel;
   // The children
-  protected ArrayList children = new ArrayList();
+  protected List<ConfigurationNode> children = new ArrayList<ConfigurationNode>();
   // Read-only flag
   protected boolean readOnly = false;
 
@@ -111,7 +111,7 @@ public class Configuration implements IH
       int i = 0;
       while (i < children.size())
       {
-        ConfigurationNode child = (ConfigurationNode)children.get(i++);
+        ConfigurationNode child = children.get(i++);
         // Duplicate the child
         ConfigurationNode newChild = child.createDuplicate(readOnly);
         rval.addChild(rval.getChildCount(),newChild);
@@ -130,7 +130,7 @@ public class Configuration implements IH
       int i = 0;
       while (i < children.size())
       {
-        ConfigurationNode child = (ConfigurationNode)children.get(i++);
+        ConfigurationNode child = children.get(i++);
         child.makeReadOnly();
       }
     }
@@ -150,7 +150,7 @@ public class Configuration implements IH
     int i = 0;
     while (i < children.size())
     {
-      ConfigurationNode node = (ConfigurationNode)children.get(i++);
+      ConfigurationNode node = children.get(i++);
       writeNode(doc,top,node);
     }
 
@@ -173,8 +173,8 @@ public class Configuration implements IH
       // same type, which requires us to do an appropriate pass to gather that stuff together.
       // Since we also need to maintain order, it is essential that we detect the out-of-order condition
       // properly, and use an alternate representation if we should find it.
-      Map childMap = new HashMap();
-      ArrayList childList = new ArrayList();
+      Map<String,List<ConfigurationNode>> childMap = new HashMap<String,List<ConfigurationNode>>();
+      List<String> childList = new ArrayList<String>();
       String lastChildType = null;
       boolean needAlternate = false;
       int i = 0;
@@ -182,10 +182,10 @@ public class Configuration implements IH
       {
         ConfigurationNode child = findChild(i++);
         String key = child.getType();
-        ArrayList list = (ArrayList)childMap.get(key);
+        List<ConfigurationNode> list = childMap.get(key);
         if (list == null)
         {
-          list = new ArrayList();
+          list = new ArrayList<ConfigurationNode>();
           childMap.put(key,list);
           childList.add(key);
         }
@@ -224,8 +224,8 @@ public class Configuration implements IH
         int q = 0;
         while (q < childList.size())
         {
-          String key = (String)childList.get(q++);
-          ArrayList list = (ArrayList)childMap.get(key);
+          String key = childList.get(q++);
+          List<ConfigurationNode> list = childMap.get(key);
           if (list.size() > 1)
           {
             // Write the key
@@ -235,7 +235,7 @@ public class Configuration implements IH
             i = 0;
             while (i < list.size())
             {
-              ConfigurationNode child = (ConfigurationNode)list.get(i++);
+              ConfigurationNode child = list.get(i++);
               writeNode(writer,child,false,false);
             }
             writer.endArray();
@@ -243,7 +243,7 @@ public class Configuration implements IH
           else
           {
             // Write it as a singleton
-            writeNode(writer,(ConfigurationNode)list.get(0),true,false);
+            writeNode(writer,list.get(0),true,false);
           }
         }
       }
@@ -334,10 +334,10 @@ public class Configuration implements IH
           writer.value(value);
         }
         
-        Iterator iter = node.getAttributes();
+        Iterator<String> iter = node.getAttributes();
         while (iter.hasNext())
         {
-          String attribute = (String)iter.next();
+          String attribute = iter.next();
           String attrValue = node.getAttributeValue(attribute);
           writer.key(JSON_ATTRIBUTE+attribute);
           writer.value(attrValue);
@@ -347,8 +347,8 @@ public class Configuration implements IH
         // same type, which requires us to do an appropriate pass to gather that stuff together.
 	// Since we also need to maintain order, it is essential that we detect the out-of-order condition
 	// properly, and use an alternate representation if we should find it.
-        Map childMap = new HashMap();
-	ArrayList childList = new ArrayList();
+        Map<String,List<ConfigurationNode>> childMap = new HashMap<String,List<ConfigurationNode>>();
+	List<String> childList = new ArrayList<String>();
 	String lastChildType = null;
         boolean needAlternate = false;
         int i = 0;
@@ -356,10 +356,10 @@ public class Configuration implements IH
         {
           ConfigurationNode child = node.findChild(i++);
           String key = child.getType();
-          ArrayList list = (ArrayList)childMap.get(key);
+          List<ConfigurationNode> list = childMap.get(key);
           if (list == null)
           {
-            list = new ArrayList();
+            list = new ArrayList<ConfigurationNode>();
             childMap.put(key,list);
             childList.add(key);
           }
@@ -398,8 +398,8 @@ public class Configuration implements IH
           int q = 0;
           while (q < childList.size())
           {
-            String key = (String)childList.get(q++);
-            ArrayList list = (ArrayList)childMap.get(key);
+            String key = childList.get(q++);
+            List<ConfigurationNode> list = childMap.get(key);
             if (list.size() > 1)
             {
               // Write the key
@@ -409,7 +409,7 @@ public class Configuration implements IH
               i = 0;
               while (i < list.size())
               {
-                ConfigurationNode child = (ConfigurationNode)list.get(i++);
+                ConfigurationNode child = list.get(i++);
                 writeNode(writer,child,false,false);
               }
               writer.endArray();
@@ -417,7 +417,7 @@ public class Configuration implements IH
             else
             {
               // Write it as a singleton
-              writeNode(writer,(ConfigurationNode)list.get(0),true,false);
+              writeNode(writer,list.get(0),true,false);
             }
           }
         }
@@ -712,7 +712,7 @@ public class Configuration implements IH
   */
   public ConfigurationNode findChild(int index)
   {
-    return (ConfigurationNode)children.get(index);
+    return children.get(index);
   }
 
   /** Remove child n.
@@ -722,7 +722,7 @@ public class Configuration implements IH
   {
     if (readOnly)
       throw new IllegalStateException("Attempt to change read-only object");
-    ConfigurationNode node = (ConfigurationNode)children.remove(index);
+    ConfigurationNode node = children.remove(index);
     removeOuterNode(node);
   }
 

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java Thu Jun  2 10:32:04 2011
@@ -28,8 +28,8 @@ public class ConfigurationNode implement
   public static final String _rcsid = "@(#)$Id: ConfigurationNode.java 988245 2010-08-23 18:39:35Z kwright $";
 
   // Member variables
-  protected ArrayList children = null;
-  protected HashMap attributes = null;
+  protected List<ConfigurationNode> children = null;
+  protected Map<String,String> attributes = null;
   protected String type = null;
   protected String value = null;
 
@@ -52,13 +52,13 @@ public class ConfigurationNode implement
     this.readOnly = source.readOnly;
     if (source.attributes != null)
     {
-      Iterator iter = source.attributes.keySet().iterator();
+      Iterator<String> iter = source.attributes.keySet().iterator();
       while (iter.hasNext())
       {
-        String attribute = (String)iter.next();
-        String attrValue = (String)source.attributes.get(attribute);
+        String attribute = iter.next();
+        String attrValue = source.attributes.get(attribute);
         if (this.attributes == null)
-          this.attributes = new HashMap();
+          this.attributes = new HashMap<String,String>();
         this.attributes.put(attribute,attrValue);
       }
     }
@@ -113,14 +113,14 @@ public class ConfigurationNode implement
     ConfigurationNode rval = createNewNode();
     rval.value = value;
     if (attributes != null)
-      rval.attributes = (HashMap)attributes.clone();
+      rval.attributes = cloneAttributes(attributes);
     if (children != null)
     {
-      rval.children = new ArrayList();
+      rval.children = new ArrayList<ConfigurationNode>();
       int i = 0;
       while (i < children.size())
       {
-        ConfigurationNode node = (ConfigurationNode)children.get(i++);
+        ConfigurationNode node = children.get(i++);
         rval.children.add(node.createDuplicate(readOnly));
       }
     }
@@ -170,7 +170,7 @@ public class ConfigurationNode implement
   */
   public ConfigurationNode findChild(int index)
   {
-    return (ConfigurationNode)children.get(index);
+    return children.get(index);
   }
 
   /** Remove child n.
@@ -198,7 +198,7 @@ public class ConfigurationNode implement
       throw new IllegalStateException("Attempt to change read-only object");
 
     if (children == null)
-      children = new ArrayList();
+      children = new ArrayList<ConfigurationNode>();
     children.add(index,child);
   }
 
@@ -241,10 +241,10 @@ public class ConfigurationNode implement
   /** Iterate over attributes.
   *@return the attribute iterator.
   */
-  public Iterator getAttributes()
+  public Iterator<String> getAttributes()
   {
     if (attributes == null)
-      return new HashMap().keySet().iterator();
+      return new HashMap<String,String>().keySet().iterator();
     return attributes.keySet().iterator();
   }
 
@@ -256,7 +256,7 @@ public class ConfigurationNode implement
   {
     if (attributes == null)
       return null;
-    return (String)attributes.get(attribute);
+    return attributes.get(attribute);
   }
 
   /** Calculate a hashcode */
@@ -267,12 +267,12 @@ public class ConfigurationNode implement
       rval += value.hashCode();
     if (attributes != null)
     {
-      Iterator iter = attributes.keySet().iterator();
+      Iterator<String> iter = attributes.keySet().iterator();
       // Make sure this is not sensitive to order!
       while (iter.hasNext())
       {
-        String key = (String)iter.next();
-        String attrValue = (String)attributes.get(key);
+        String key = iter.next();
+        String attrValue = attributes.get(key);
         rval += key.hashCode() + attrValue.hashCode();
       }
     }
@@ -312,12 +312,12 @@ public class ConfigurationNode implement
     }
     if (attributes != null && n.attributes != null)
     {
-      Iterator iter = attributes.keySet().iterator();
+      Iterator<String> iter = attributes.keySet().iterator();
       while (iter.hasNext())
       {
-        String key = (String)iter.next();
-        String attrValue = (String)attributes.get(key);
-        String nAttrValue = (String)n.attributes.get(key);
+        String key = iter.next();
+        String attrValue = attributes.get(key);
+        String nAttrValue = n.attributes.get(key);
         if (nAttrValue == null || !attrValue.equals(nAttrValue))
           return false;
       }
@@ -327,8 +327,8 @@ public class ConfigurationNode implement
       int i = 0;
       while (i < children.size())
       {
-        ConfigurationNode child = (ConfigurationNode)children.get(i);
-        ConfigurationNode nChild = (ConfigurationNode)n.children.get(i);
+        ConfigurationNode child = children.get(i);
+        ConfigurationNode nChild = n.children.get(i);
         if (!child.equals(nChild))
           return false;
         i++;
@@ -337,4 +337,15 @@ public class ConfigurationNode implement
     return true;
   }
 
+  protected static Map<String,String> cloneAttributes(Map<String,String> attributes)
+  {
+    Map<String,String> rval = new HashMap<String,String>();
+    Iterator<Map.Entry<String,String>> iter = attributes.entrySet().iterator();
+    while (iter.hasNext())
+    {
+      Map.Entry<String,String> entry = iter.next();
+      rval.put(entry.getKey(),entry.getValue());
+    }
+    return rval;
+  }
 }

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IConnector.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IConnector.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IConnector.java Thu Jun  2 10:32:04 2011
@@ -99,7 +99,7 @@ public interface IConnector
   *@param parameters are the configuration parameters, as they currently exist, for this connection being configured.
   *@param tabsArray is an array of tab names.  Add to this array any tab names that are specific to the connector.
   */
-  public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, ArrayList tabsArray)
+  public void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, ConfigParams parameters, List<String> tabsArray)
     throws ManifoldCFException, IOException;
   
   /** Output the configuration body section.

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IDBInterface.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IDBInterface.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IDBInterface.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IDBInterface.java Thu Jun  2 10:32:04 2011
@@ -78,7 +78,7 @@ public interface IDBInterface
   * invalidated.
   *@param parameterMap is the map of column name/values to write.
   */
-  public void performInsert(String tableName, Map parameterMap, StringSet invalidateKeys)
+  public void performInsert(String tableName, Map<String,Object> parameterMap, StringSet invalidateKeys)
     throws ManifoldCFException;
 
   /** Perform an update operation.
@@ -88,7 +88,8 @@ public interface IDBInterface
   *@param whereClause is the where clause describing the match (including the WHERE), or null if none.
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
-  public void performUpdate(String tableName, Map parameterMap, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
+  public void performUpdate(String tableName, Map<String,Object> parameterMap, String whereClause,
+    List whereParameters, StringSet invalidateKeys)
     throws ManifoldCFException;
 
   /** Perform a delete operation.
@@ -97,7 +98,7 @@ public interface IDBInterface
   *@param whereClause is the where clause describing the match (including the WHERE), or null if none.
   *@param whereParameters are the parameters that come with the where clause, if any.
   */
-  public void performDelete(String tableName, String whereClause, ArrayList whereParameters, StringSet invalidateKeys)
+  public void performDelete(String tableName, String whereClause, List whereParameters, StringSet invalidateKeys)
     throws ManifoldCFException;
 
   /** Perform a table creation operation.
@@ -107,7 +108,7 @@ public interface IDBInterface
   * layer.  The types are ColumnDefinition objects.
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
-  public void performCreate(String tableName, Map columnMap, StringSet invalidateKeys)
+  public void performCreate(String tableName, Map<String,ColumnDescription> columnMap, StringSet invalidateKeys)
     throws ManifoldCFException;
 
   /** Perform a table alter operation.
@@ -120,7 +121,8 @@ public interface IDBInterface
   *@param columnDeleteList is the list of column names to delete.
   *@param invalidateKeys are the cache keys that should be invalidated, if any.
   */
-  public void performAlter(String tableName, Map columnMap, Map columnModifyMap, ArrayList columnDeleteList,
+  public void performAlter(String tableName, Map<String,ColumnDescription> columnMap,
+    Map<String,ColumnDescription> columnModifyMap, List<String> columnDeleteList,
     StringSet invalidateKeys)
     throws ManifoldCFException;
 
@@ -130,7 +132,7 @@ public interface IDBInterface
   *@param columnList is the list of columns that need to be included
   * in the index, in order.
   */
-  public void addTableIndex(String tableName, boolean unique, ArrayList columnList)
+  public void addTableIndex(String tableName, boolean unique, List<String> columnList)
     throws ManifoldCFException;
 
   /** Add an index to a table.
@@ -188,7 +190,7 @@ public interface IDBInterface
   *@param queryClass is the name of the query class, or null.
   *@return a map of column names and ColumnDescription objects, describing the schema.
   */
-  public Map getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
+  public Map<String,ColumnDescription> getTableSchema(String tableName, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException;
 
   /** Get a table's indexes.
@@ -197,7 +199,7 @@ public interface IDBInterface
   *@param queryClass is the name of the query class, or null.
   *@return a map of index names and IndexDescription objects, describing the indexes.
   */
-  public Map getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
+  public Map<String,IndexDescription> getTableIndexes(String tableName, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException;
 
   /** Get a database's tables.
@@ -213,7 +215,7 @@ public interface IDBInterface
   *@param params are the parameterized values, if needed.
   *@param invalidateKeys are the cache keys to invalidate.
   */
-  public void performModification(String query, ArrayList params, StringSet invalidateKeys)
+  public void performModification(String query, List params, StringSet invalidateKeys)
     throws ManifoldCFException;
 
   /** Perform a general "data fetch" query.
@@ -224,7 +226,7 @@ public interface IDBInterface
   * or null if no LRU behavior desired.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass)
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass)
     throws ManifoldCFException;
 
   /** Perform a general "data fetch" query.
@@ -237,7 +239,7 @@ public interface IDBInterface
   *@param returnLimit is a description of how to limit the return result, or null if no limit.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass,
     int maxResults, ILimitChecker returnLimit)
     throws ManifoldCFException;
 
@@ -252,7 +254,7 @@ public interface IDBInterface
   *@param returnLimit is a description of how to limit the return result, or null if no limit.
   *@return a resultset.
   */
-  public IResultSet performQuery(String query, ArrayList params, StringSet cacheKeys, String queryClass,
+  public IResultSet performQuery(String query, List params, StringSet cacheKeys, String queryClass,
     int maxResults, ResultSpecification resultSpec, ILimitChecker returnLimit)
     throws ManifoldCFException;
 
@@ -287,15 +289,16 @@ public interface IDBInterface
   * This filter wraps a query and returns a new query whose results are similar to POSTGRESQL's DISTINCT-ON feature.
   * Specifically, for each combination of the specified distinct fields in the result, only the first such row is included in the final
   * result.
-  *@param outputParameters is a blank arraylist into which to put parameters.  Null may be used if the baseParameters parameter is null.
+  *@param outputParameters is a blank list into which to put parameters.  Null may be used if the baseParameters parameter is null.
   *@param baseQuery is the base query, which is another SELECT statement, without parens,
   * e.g. "SELECT ..."
   *@param baseParameters are the parameters corresponding to the baseQuery.
   *@param distinctFields are the fields to consider to be distinct.  These should all be keys in otherFields below.
   *@param otherFields are the rest of the fields to return, keyed by the AS name, value being the base query column value, e.g. "value AS key"
-  *@return a revised query that performs the necessary DISTINCT ON operation.  The arraylist outputParameters will also be appropriately filled in.
+  *@return a revised query that performs the necessary DISTINCT ON operation.  The list outputParameters will also be appropriately filled in.
   */
-  public String constructDistinctOnClause(ArrayList outputParameters, String baseQuery, ArrayList baseParameters, String[] distinctFields, Map otherFields);
+  public String constructDistinctOnClause(List outputParameters, String baseQuery, List baseParameters,
+    String[] distinctFields, Map<String,String> otherFields);
   
   /** Obtain the maximum number of individual items that should be
   * present in an IN clause.  Exceeding this amount will potentially cause the query performance

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IResultRow.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IResultRow.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IResultRow.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IResultRow.java Thu Jun  2 10:32:04 2011
@@ -34,7 +34,7 @@ public interface IResultRow
   /** Obtain the set of columns for a row.
   @return an iterator that will list all the (String) column names stored in that row.
   */
-  public Iterator getColumns();
+  public Iterator<String> getColumns();
 
   /** Get the row value for a column.
   *@param columnName is the name of the column.

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ResultSpecification.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ResultSpecification.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ResultSpecification.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ResultSpecification.java Thu Jun  2 10:32:04 2011
@@ -87,7 +87,7 @@ public class ResultSpecification
   /** Convert to a unique string */
   public String toString()
   {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     String[] keys = new String[columnSpecifications.size()];
     Iterator iter = columnSpecifications.keySet().iterator();
     int i = 0;

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/StringSet.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/StringSet.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/StringSet.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/StringSet.java Thu Jun  2 10:32:04 2011
@@ -183,7 +183,7 @@ public class StringSet
       // Get as array first
       String[] array = getArray(null);
       java.util.Arrays.sort(array);
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       int i = 0;
       while (i < array.length)
       {

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockObject.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockObject.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockObject.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/lockmanager/LockObject.java Thu Jun  2 10:32:04 2011
@@ -658,7 +658,7 @@ public class LockObject
         BufferedReader x = new BufferedReader(fr);
         try
         {
-          StringBuffer sb = new StringBuffer();
+          StringBuilder sb = new StringBuilder();
           while (true)
           {
             int rval = x.read();

Modified: incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java (original)
+++ incubator/lcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/system/ManifoldCF.java Thu Jun  2 10:32:04 2011
@@ -386,7 +386,7 @@ public class ManifoldCF
   */
   public static String safeFileName(String value)
   {
-    StringBuffer rval = new StringBuffer();
+    StringBuilder rval = new StringBuilder();
     int i = 0;
     while (i < value.length())
     {
@@ -488,7 +488,7 @@ public class ManifoldCF
     try
     {
       byte[] encryptedBytes = digest.digest();
-      StringBuffer rval = new StringBuffer();
+      StringBuilder rval = new StringBuilder();
       int i = 0;
       while (i < encryptedBytes.length)
       {
@@ -545,7 +545,7 @@ public class ManifoldCF
         array[i++] = (byte)(x ^ 0x59);
       }
       // Now, convert to hex
-      StringBuffer rval = new StringBuffer();
+      StringBuilder rval = new StringBuilder();
       i = 0;
       while (i < array.length)
       {
@@ -723,7 +723,7 @@ public class ManifoldCF
           break;
         currentIndex++;
       }
-      StringBuffer argBuffer = new StringBuffer();
+      StringBuilder argBuffer = new StringBuilder();
       boolean isQuoted = false;
       while (currentIndex < configChangeSignalCommand.length())
       {
@@ -817,7 +817,7 @@ public class ManifoldCF
               BufferedReader br = new BufferedReader(r);
               try
               {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 while (true)
                 {
                   String value = br.readLine();

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/CheckAll.java Thu Jun  2 10:32:04 2011
@@ -108,7 +108,7 @@ public class CheckAll
   /** Encode a string so that it doesn't have control characters, newlines, or colons in it */
   protected static String encode(String input)
   {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authority/AuthorityConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authority/AuthorityConnectionManager.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authority/AuthorityConnectionManager.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authority/AuthorityConnectionManager.java Thu Jun  2 10:32:04 2011
@@ -446,7 +446,7 @@ public class AuthorityConnectionManager 
     try
     {
       i = 0;
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       ArrayList params = new ArrayList();
       int j = 0;
       int maxIn = getMaxInClause();

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/AddScheduledTime.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/AddScheduledTime.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/AddScheduledTime.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/AddScheduledTime.java Thu Jun  2 10:32:04 2011
@@ -99,7 +99,7 @@ public class AddScheduledTime
                 if (list.length() == 0)
                         return null;
 
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 int index = 0;
                 while (true)
                 {
@@ -143,7 +143,7 @@ public class AddScheduledTime
                 if (list.length() == 0)
                         return null;
 
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 int index = 0;
                 while (true)
                 {
@@ -200,7 +200,7 @@ public class AddScheduledTime
                 if (list.length() == 0)
                         return null;
 
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 int index = 0;
                 while (true)
                 {
@@ -232,7 +232,7 @@ public class AddScheduledTime
                 if (list.length() == 0)
                         return null;
 
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 int index = 0;
                 while (true)
                 {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/GetJobSchedule.java Thu Jun  2 10:32:04 2011
@@ -85,7 +85,7 @@ public class GetJobSchedule
   {
     if (ev == null)
       return "any";
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     Iterator iter = ev.getValues();
     boolean first = true;
     while (iter.hasNext())
@@ -110,7 +110,7 @@ public class GetJobSchedule
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobStatuses.java Thu Jun  2 10:32:04 2011
@@ -115,7 +115,7 @@ public class ListJobStatuses
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/ListJobs.java Thu Jun  2 10:32:04 2011
@@ -133,7 +133,7 @@ public class ListJobs
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunDocumentStatus.java Thu Jun  2 10:32:04 2011
@@ -113,7 +113,7 @@ public class RunDocumentStatus
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxActivityHistory.java Thu Jun  2 10:32:04 2011
@@ -105,7 +105,7 @@ public class RunMaxActivityHistory
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunMaxBandwidthHistory.java Thu Jun  2 10:32:04 2011
@@ -105,7 +105,7 @@ public class RunMaxBandwidthHistory
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunQueueStatus.java Thu Jun  2 10:32:04 2011
@@ -115,7 +115,7 @@ public class RunQueueStatus
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java?rev=1130475&r1=1130474&r2=1130475&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/RunSimpleHistory.java Thu Jun  2 10:32:04 2011
@@ -110,7 +110,7 @@ public class RunSimpleHistory
 
   protected static String commaEscape(String input)
   {
-    StringBuffer output = new StringBuffer();
+    StringBuilder output = new StringBuilder();
     int i = 0;
     while (i < input.length())
     {



Mime
View raw message