db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1032479 - in /db/derby/code/trunk/java/build/org/apache/derbyBuild: ./ javadoc/
Date Mon, 08 Nov 2010 07:56:08 GMT
Author: kahatlen
Date: Mon Nov  8 07:56:07 2010
New Revision: 1032479

URL: http://svn.apache.org/viewvc?rev=1032479&view=rev
Log:
DERBY-4893: Allow Java 5 language constructs in build code

- Changed source and target level for the build code to 1.5

- Changed some variable declarations to silence "unchecked" warnings
  emitted by the compiler after the change

Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/ElementFacade.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/GeneratorBase.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/JiraIssue.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBundleTest.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/ODBCMetadataGenerator.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml
    db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/DiskLayoutTaglet.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/EndFormatTaglet.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/FormatIdTaglet.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/PurposeTaglet.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/UpgradeTaglet.java
    db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/ClassSizeCrawler.java Mon Nov  8
07:56:07 2010
@@ -133,7 +133,7 @@ public class ClassSizeCrawler
 
         StringBuffer packagePrefix = new StringBuffer( );
 
-        Hashtable classSizes = new Hashtable();
+        Hashtable<String, int[]> classSizes = new Hashtable<String, int[]>();
 
         ClassSizeCrawler crawler = new ClassSizeCrawler(interfaceList, interfaceCount, classSizes);
 
@@ -225,14 +225,14 @@ public class ClassSizeCrawler
         }
     } // end of main
 
-    private Class[] interfaceList; // Search for classes that implement these interfaces
+    private Class<?>[] interfaceList; // Search for classes that implement these interfaces
     private int interfaceCount;
-    private Hashtable classSizes;
+    private Hashtable<String, int[]> classSizes;
     private boolean verbose = false;
 
     private ClassSizeCrawler( Class[] interfaceList,
                               int interfaceCount,
-                              Hashtable classSizes)
+                              Hashtable<String, int[]> classSizes)
     {
         this.interfaceList = interfaceList;
         this.classSizes = classSizes;
@@ -270,7 +270,7 @@ public class ClassSizeCrawler
                 // Strip off the ".class" suffix
                 String s = filenames[fileIdx].substring( 0, filenames[fileIdx].length() -
6);
                 className.append( s);
-                Class targetClass = null;
+                Class<?> targetClass = null;
                 String targetClassName = className.toString();
                 try
                 {

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/ElementFacade.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/ElementFacade.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/ElementFacade.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/ElementFacade.java Mon Nov  8 07:56:07
2010
@@ -83,10 +83,10 @@ public class ElementFacade {
      * @return list of texts corresponding to the specified tag
      * @throws java.lang.Exception
      */
-    public List getTextListByTagName(String tag) throws Exception {
+    public List<String> getTextListByTagName(String tag) throws Exception {
         NodeList matchingTags = root.getElementsByTagName(tag);
         final int length = matchingTags.getLength();
-        ArrayList tagValues = new ArrayList();
+        ArrayList<String> tagValues = new ArrayList<String>();
         for (int i = 0; i < length; ++i) {
             tagValues.add(matchingTags.item(i).getFirstChild().getNodeValue());
         }

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/GeneratorBase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/GeneratorBase.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/GeneratorBase.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/GeneratorBase.java Mon Nov  8 07:56:07
2010
@@ -96,9 +96,9 @@ public class GeneratorBase extends Task 
     // computed at run time
     protected final String releaseID;
     protected String previousReleaseID;
-    protected List excludeReleaseIDList;
+    protected List<String> excludeReleaseIDList;
     protected final String branch;
-    protected ArrayList errors = new ArrayList();
+    protected ArrayList<String> errors = new ArrayList<String>();
 
     // misc
     protected boolean _invokedByAnt = true;

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/JiraIssue.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/JiraIssue.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/JiraIssue.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/JiraIssue.java Mon Nov  8 07:56:07
2010
@@ -70,7 +70,7 @@ class JiraIssue {
      */
     public static List createJiraIssueList(String source)
             throws IOException {
-        ArrayList jiraIssues = new ArrayList();
+        ArrayList<JiraIssue> jiraIssues = new ArrayList<JiraIssue>();
 
         BufferedReader in = new BufferedReader(new FileReader(source));
         String line;
@@ -79,7 +79,7 @@ class JiraIssue {
             System.out.println(line);
         }
 
-        ArrayList comments = new ArrayList();
+        ArrayList<String> comments = new ArrayList<String>();
         int state = STATE_ADD_KEY;
         String key = null;
         String summary = null;

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java Mon Nov  8 07:56:07
2010
@@ -138,7 +138,7 @@ public class MessageBuilder extends Task
         
         private         FileWriter   _fw;
         private         PrintWriter _pw;
-        private         ArrayList    _tagStack;
+        private         ArrayList<String>    _tagStack;
 
         /**
          * <p>
@@ -163,7 +163,7 @@ public class MessageBuilder extends Task
             _vacuous = false;
             _fw = new FileWriter( file );
             _pw = new PrintWriter( _fw );
-            _tagStack = new ArrayList();
+            _tagStack = new ArrayList<String>();
         }
 
         public  void    flush() throws IOException

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBundleTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBundleTest.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBundleTest.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBundleTest.java Mon Nov  8
07:56:07 2010
@@ -70,9 +70,9 @@ public class MessageBundleTest {
     }    
     
     // The list of ids.  We use a HashSet so we can detect duplicates easily
-    static HashSet sqlStateIds          = new HashSet();
-    static HashSet messageIdIds         = new HashSet();
-    static HashSet messageBundleIds     = new HashSet();
+    static HashSet<String> sqlStateIds  = new HashSet<String>();
+    static HashSet<String> messageIdIds = new HashSet<String>();
+    static HashSet<String> messageBundleIds = new HashSet<String>();
     
     static {
         try {
@@ -90,7 +90,8 @@ public class MessageBundleTest {
         }
     }
     
-    static void loadClassIds(Class idclass, HashSet set) throws Exception {
+    static void loadClassIds(Class idclass, HashSet<String> set)
+            throws Exception {
         Field[] fields = idclass.getFields();
         
         int length = fields.length;

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/ODBCMetadataGenerator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/ODBCMetadataGenerator.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/ODBCMetadataGenerator.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/ODBCMetadataGenerator.java Mon Nov
 8 07:56:07 2010
@@ -33,7 +33,7 @@ import java.util.ArrayList;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
-/* ****
+/**
  * This class is used at COMPILE TIME ONLY.  It is responsible for generating
  * ODBC metadata queries based on existing JDBC queries.  In a word,
  * this class reads from the org/apache/derby/impl/jdbc/metadata.properties
@@ -124,7 +124,7 @@ public class ODBCMetadataGenerator {
     
 	// List of what types of changes are required for a given
 	// metadata procedure.
-	private HashMap changeMap;
+	private HashMap<String, Byte> changeMap;
 
 	// SQL fragments and keywords that are used in composing
 	// ODBC metadata queries.  These are loaded from a file
@@ -139,7 +139,7 @@ public class ODBCMetadataGenerator {
 	// properties file that is in the SOURCE/CODELINE.
 	private FileWriter odbcMetaFile;
 
-	/* ****
+	/**
 	 * Constructor.
 	 * Initializes SQL fragments used for generation, and
 	 * then opens the output file,
@@ -177,7 +177,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * initChanges
 	 * Create a listing of the types of changes that need to be
 	 * made for each metadata query to be ODBC-compliant.
@@ -192,7 +192,7 @@ public class ODBCMetadataGenerator {
 	 */
 	private void initChanges() {
 
-		changeMap = new HashMap();
+		changeMap = new HashMap<String, Byte>();
 
 		changeMap.put("getProcedures",
 			new Byte(COL_RENAME_CHANGE));
@@ -235,7 +235,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * generateODBCQueries:
 	 * Reads the existing (JDBC) metadata queries from
 	 * metadata.properties and, for each one, makes a call
@@ -317,7 +317,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * generateODBCQuery
 	 * Takes a specific JDBC query, writes it to the output file,
 	 * and then creates an ODBC-compliant version of that
@@ -376,7 +376,7 @@ public class ODBCMetadataGenerator {
 
 		// Get a list of the column definitions in the subquery, for
 		// use by subsequent operations.
-		ArrayList colDefs = new ArrayList();
+		ArrayList<String> colDefs = new ArrayList<String>();
 		pos = getSelectColDefinitions(queryText, colDefs);
 
 		// In some cases, we need to add "helper" columns to the
@@ -447,7 +447,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * renameColsForODBC
 	 * Renames any columns in the received query so that they are
 	 * ODBC-compliant.
@@ -491,7 +491,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * renameColForODBC
 	 * Searches for the old column name in the received String
 	 * buffer and replaces it with the new column name.  Note
@@ -502,8 +502,6 @@ public class ODBCMetadataGenerator {
 	 *	rename operation.
 	 * @param oldVal The old column name.
 	 * @param newVal The new column name.
-	 * @return Occurence of <"AS " + oldVal> in the query text
-	 *	has been changed IN PLACE to newVal.
 	 */
 	private void renameColForODBC(StringBuffer queryText,
 		String oldVal, String newVal)
@@ -542,7 +540,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * generateSELECTClause
 	 * Generates an outer SELECT clause that is then wrapped around a
 	 * JDBC query to change the types and/or values of the JDBC
@@ -563,7 +561,7 @@ public class ODBCMetadataGenerator {
 	 *  elements, "A" and "B".
 	 * @param newQueryText StringBuffer to which the generated
 	 *  outer SELECT will be appended.
-	 * @return An outer SELECT clause has been generated and
+	 *  On return, an outer SELECT clause has been generated and
 	 *  appended to the received buffer.  The "FROM" keyword
 	 *  has been appended, but the subquery itself is NOT
 	 *  added here.
@@ -639,7 +637,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * changeValuesForODBC
 	 * Searches for a JDBC column name in the received String
 	 * buffer and replaces the first occurrence with an ODBC-
@@ -649,8 +647,6 @@ public class ODBCMetadataGenerator {
 	 * @param queryName Name of the query being processed.
 	 * @param newQueryText The query text in which we're doing the
 	 *	change-value operation.
-	 * @return All relevant columns have been updated IN PLACE
-	 *	to return the required ODBC-compliant values.
 	 */
 	private void changeValuesForODBC(String queryName,
 		StringBuffer newQueryText)
@@ -688,7 +684,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * changeColValueToODBC
 	 * Searches for the received column name in the received String
 	 * buffer and replaces it with an ODBC-compliant value.
@@ -696,8 +692,6 @@ public class ODBCMetadataGenerator {
 	 * @param colName Name of the specific column to update.
 	 * @param newQueryText The query text in which we're doing
 	 *	the change-value operation.
-	 * @return The received column has been updated IN PLACE
-	 *	to return the required ODBC-compliant value.
 	 */
 	private void changeColValueToODBC(String queryName, String colName,
 		StringBuffer newQueryText)
@@ -755,7 +749,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * getSelectColDefinitions
 	 * Parses the SELECT clause of a JDBC metadata SQL query
 	 * and returns a list of the columns being selected.  For
@@ -763,7 +757,7 @@ public class ODBCMetadataGenerator {
 	 * B AS C, D * 2 FROM T1", this method will return an
 	 * ArrayList with three string elements: 1) "A", 2) "B
 	 * AS C", and 3) "D * 2".
-	 * @param query The query from which we are extracting
+	 * @param queryText The query from which we are extracting
 	 *	the SELECT columns.
 	 * @param colDefList ArrayList in which we want to
 	 * 	store the column definitions that we find.
@@ -774,7 +768,7 @@ public class ODBCMetadataGenerator {
 	 *	clause, for later use by the calling method.
 	 */
 	private int getSelectColDefinitions(StringBuffer queryText,
-		ArrayList colDefList)
+		ArrayList<String> colDefList)
 	{
 
 		// Create a string for purposes of using "indexOf"
@@ -838,7 +832,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * addHelperColsToSubquery
 	 * For some of the metadata queries, the ODBC version
 	 * needs to access values that are only available in
@@ -889,7 +883,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * extractColName
 	 * Takes a single column definition from a SELECT clause
 	 * and returns only the unqualified name of the column.
@@ -940,7 +934,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * getCastInfoForCol
 	 * Returns the target type for a result set column that
 	 * needs to be cast into an ODBC type.  This is usually
@@ -1008,7 +1002,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * markNewColPosition
 	 * In effect, "marks" the position at which additional
 	 * columns are to be added for ODBC compliance.  This
@@ -1020,7 +1014,7 @@ public class ODBCMetadataGenerator {
 	 * @param selectColDefs Array list of the SELECT
 	 * 	columns that exist in the ODBC version of
 	 *	the query thus far.
-	 * @return A dummy column name has been added to
+	 *  On return, a dummy column name has been added to
 	 *	the received list of columns at the position
 	 *	at which new ODBC columns should be added.
 	 *  If a query doesn't require additional
@@ -1028,7 +1022,7 @@ public class ODBCMetadataGenerator {
 	 *	leaves the received column list unchanged.
 	 */
 	private void markNewColPosition(String queryName,
-		ArrayList selectColDefs)
+		ArrayList<String> selectColDefs)
 	{
 
 		if (!stmtNeedsChange(queryName, ADD_COLUMN_CHANGE))
@@ -1048,7 +1042,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * addNewColumnsForODBC
 	 * Adds new columns to the ODBC version of a metadata
 	 * query (the ODBC version is at this point being
@@ -1059,9 +1053,9 @@ public class ODBCMetadataGenerator {
 	 * that dummy placeholder with the SQL text for the
 	 * new columns.
 	 * @param queryName Name of query being processed.
-	 * @newQueryText The buffer in which we want to
+	 * @param newQueryText The buffer in which we want to
 	 * 	add the new column.
-	 * @return The dummy placeholder in the received
+	 *  On return, the dummy placeholder in the received
 	 *  buffer has been replaced with any ODBC columns
 	 *  that need to be added to the query in question
 	 *  for ODBC compliance.
@@ -1087,16 +1081,16 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * fragSubstitution
 	 * Replaces a single occurrence of the received
 	 * fragment key with the text corresponding to
 	 * that key.
 	 * @param fragKey The fragment key for which we are
 	 *	going to do the substitution.
-	 * @queryText The buffer in which we are going to do
+	 * @param queryText The buffer in which we are going to do
 	 * 	the substitution.
-	 * @return fragKey has been substituted (IN PLACE)
+	 *  On return, fragKey has been substituted (IN PLACE)
 	 *	with the fragment corresponding to it in the
 	 *	received buffer.  If the fragment key could not
 	 * 	be found, the buffer remains unchanged.
@@ -1150,7 +1144,7 @@ public class ODBCMetadataGenerator {
      * with
      * @param queryText The buffer in which we are going to do the
      * substitution.
-     * @return the old pattern is substituted with the new pattern (IN
+     * On return, the old pattern is substituted with the new pattern (IN
      * PLACE). If the old pattern could not be found, the queryText
      * buffer remains unchanged.
      */
@@ -1179,7 +1173,7 @@ public class ODBCMetadataGenerator {
                               newPattern);
     }
 
-	/* ****
+	/**
 	 * trimIgnorable
 	 * Removes all 'ignorable' chars that immediately precede or
 	 * follow (depending on the direction) the character at
@@ -1220,7 +1214,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * trimIgnorable
 	 * Same as trimIgnorable above, except with String argument
 	 * instead of char[].
@@ -1245,7 +1239,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * Return true if the column is a BOOLEAN column which should
 	 * be coerced to an INTEGER.
 	 */
@@ -1261,7 +1255,7 @@ public class ODBCMetadataGenerator {
 		return false;
 	}
     
-	/* ****
+	/**
 	 * stmtNeedsChange
 	 * Returns whether or not a specific metadata statement
 	 * requires the received type of change.  This is determined
@@ -1271,7 +1265,7 @@ public class ODBCMetadataGenerator {
 	 */
 	private boolean stmtNeedsChange(String queryName, byte changeType) {
 
-		Byte changeByte = (Byte)changeMap.get(queryName);
+		Byte changeByte = changeMap.get(queryName);
 		if (changeByte == null)
 		// No entry means change is not needed.
 			return false;
@@ -1280,7 +1274,7 @@ public class ODBCMetadataGenerator {
 
 	}
 
-	/* ****
+	/**
 	 * getFragment
 	 * Looks up an SQL fragment and returns the value as a String.
 	 * @param String fragId id of the fragment to look up.

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java Mon Nov
 8 07:56:07 2010
@@ -147,7 +147,7 @@ public class ReleaseNotesGenerator exten
     private ReleaseNoteReader releaseNoteReader = new ReleaseNoteReader(docBldr);
     // set on the command line or by ant
 
-    private ArrayList missingReleaseNotes = new ArrayList();
+    private List<JiraIssue> missingReleaseNotes = new ArrayList<JiraIssue>();
 
 
     public ReleaseNotesGenerator() throws Exception {

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/build.xml Mon Nov  8 07:56:07 2010
@@ -39,8 +39,8 @@
     <copy file="${derby.build.src.dir}/org/apache/derbyBuild/odbcgen_fragments.properties"
tofile="${out.dir}/org/apache/derbyBuild/odbcgen_fragments.properties"/>
 
     <javac
-      source="1.4"
-      target="1.4"
+      source="1.5"
+      target="1.5"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/classlister.java Mon Nov  8 07:56:07
2010
@@ -67,7 +67,7 @@ import java.io.*;
 public class classlister {
 
 	protected String[] sets;
-	protected Hashtable foundClasses;
+	protected Hashtable<String, String> foundClasses;
 	//protected ClassUtilitiesFactory cuf;
 
 	protected boolean cloudscapeOnly = false;
@@ -84,10 +84,11 @@ public class classlister {
 	protected boolean showAll = false;
 	protected boolean keepRolling = false;
 	protected boolean showOne = false;
-	protected Hashtable masterClassList = new Hashtable();
+	protected Hashtable<String, Hashtable<String, String>> masterClassList =
+            new Hashtable<String, Hashtable<String, String>>();
     protected String classpath[] = null;
     protected String outputfile;
-    protected Hashtable classpathHash;
+    protected Hashtable<String, Object> classpathHash;
 	protected int indent = 0;
 	protected int errorCount = 0;
 	protected PrintWriter pwOut;
@@ -154,7 +155,7 @@ public class classlister {
 		loadClasspath();
 		//cuf = new ModifyClasses();
 
-		foundClasses = new Hashtable(3000, 0.8f);  
+		foundClasses = new Hashtable<String, String>(3000, 0.8f);
 		
 		for (int i = 0; i < sets.length; i++) 
 		{
@@ -259,7 +260,7 @@ public class classlister {
 
     protected void loadClasspath()
     {
-        classpathHash = new Hashtable();
+        classpathHash = new Hashtable<String, Object>();
             try
             {
                 String classpathString = System.getProperty("java.class.path");
@@ -531,13 +532,13 @@ public class classlister {
 
         try
         {
-			Hashtable localHashtable = null;
+			Hashtable<String, String> localHashtable = null;
 			
 			if (keepDependencyHistory) {
-				localHashtable = (Hashtable) masterClassList.get(className);
+				localHashtable = masterClassList.get(className);
 				if (localHashtable == null)
 				{
-					localHashtable = new Hashtable();
+					localHashtable = new Hashtable<String, String>();
 					masterClassList.put(className, localHashtable);
 				}
 			}
@@ -668,8 +669,9 @@ public class classlister {
 		{
 			String kid = (String) e.nextElement();
 			pwOut.println(kid );
-			Hashtable scoreboard = new Hashtable();
-			Hashtable grandkids = (Hashtable) masterClassList.get(kid);
+			Hashtable<String, Integer> scoreboard =
+                    new Hashtable<String, Integer>();
+			Hashtable<String, String> grandkids = masterClassList.get(kid);
 			unrollHashtable("", grandkids, scoreboard, 1);
 		}
 	}
@@ -698,22 +700,26 @@ public class classlister {
 	}
 
 
-	protected void unrollHashtable( String parent, Hashtable current, Hashtable scoreboard,
int indentLevel)
+	protected void unrollHashtable(
+            String parent,
+            Hashtable<String, String> current,
+            Hashtable<String, Integer> scoreboard,
+            int indentLevel)
 	{
 		String indentString = "  ";
-		Enumeration e = current.keys();
+		Enumeration<String> e = current.keys();
 		String key = null;
  
 		while (e.hasMoreElements())
 		{
-			key = (String) e.nextElement();
+			key = e.nextElement();
 			if (key.equals(parent))
 			{
 				continue;
 			}
 			pwOut.print(indentLevel + ":");
 
-			Integer value = (Integer) scoreboard.get(key);
+			Integer value = scoreboard.get(key);
 			if (value != null )
 			{
 				for (int i = 0; i < indentLevel; i++)
@@ -729,7 +735,8 @@ public class classlister {
 			}
 			pwOut.println(key);
 
-			Hashtable currentsChildren = (Hashtable) masterClassList.get(key);
+			Hashtable<String, String> currentsChildren =
+                    masterClassList.get(key);
 	scoreboard.put(key, new Integer(indentLevel));
 			unrollHashtable(key, currentsChildren, scoreboard, (indentLevel+1));
 			scoreboard.put(key, new Integer(indentLevel));

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/DiskLayoutTaglet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/DiskLayoutTaglet.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/DiskLayoutTaglet.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/DiskLayoutTaglet.java Mon
Nov  8 07:56:07 2010
@@ -96,7 +96,7 @@ public class DiskLayoutTaglet implements
      * Register this Taglet.
      * @param tagletMap
      */
-    public static void register(Map tagletMap) {
+    public static void register(Map<String, Taglet> tagletMap) {
        DiskLayoutTaglet tag = new DiskLayoutTaglet();
        Taglet t = (Taglet) tagletMap.get(tag.getName());
        if (t != null) {

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/EndFormatTaglet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/EndFormatTaglet.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/EndFormatTaglet.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/EndFormatTaglet.java Mon
Nov  8 07:56:07 2010
@@ -96,7 +96,7 @@ public class EndFormatTaglet implements 
      * Register this Taglet.
      * @param tagletMap
      */
-    public static void register(Map tagletMap) {
+    public static void register(Map<String, Taglet> tagletMap) {
        EndFormatTaglet tag = new EndFormatTaglet();
        Taglet t = (Taglet) tagletMap.get(tag.getName());
        if (t != null) {

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/FormatIdTaglet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/FormatIdTaglet.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/FormatIdTaglet.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/FormatIdTaglet.java Mon Nov
 8 07:56:07 2010
@@ -98,7 +98,7 @@ public class FormatIdTaglet implements T
      * Register this Taglet.
      * @param tagletMap
      */
-    public static void register(Map tagletMap) {
+    public static void register(Map<String, Taglet> tagletMap) {
        FormatIdTaglet tag = new FormatIdTaglet();
        Taglet t = (Taglet) tagletMap.get(tag.getName());
        if (t != null) {

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/PurposeTaglet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/PurposeTaglet.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/PurposeTaglet.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/PurposeTaglet.java Mon Nov
 8 07:56:07 2010
@@ -97,7 +97,7 @@ public class PurposeTaglet implements Ta
      * Register this Taglet.
      * @param tagletMap
      */
-    public static void register(Map tagletMap) {
+    public static void register(Map<String, Taglet> tagletMap) {
        PurposeTaglet tag = new PurposeTaglet();
        Taglet t = (Taglet) tagletMap.get(tag.getName());
        if (t != null) {

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/UpgradeTaglet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/UpgradeTaglet.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/UpgradeTaglet.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/javadoc/UpgradeTaglet.java Mon Nov
 8 07:56:07 2010
@@ -97,7 +97,7 @@ public class UpgradeTaglet implements Ta
      * Register this Taglet.
      * @param tagletMap
      */
-    public static void register(Map tagletMap) {
+    public static void register(Map<String, Taglet> tagletMap) {
        UpgradeTaglet tag = new UpgradeTaglet();
        Taglet t = (Taglet) tagletMap.get(tag.getName());
        if (t != null) {

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java?rev=1032479&r1=1032478&r2=1032479&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/splitmessages.java Mon Nov  8 07:56:07
2010
@@ -43,7 +43,7 @@ public class splitmessages {
      *  This covers 90% of the cases.  Only add ids here if you have a 
      *  message id that is not in the XJ class.
      */
-    private static TreeSet clientMessageIds = new TreeSet();
+    private static TreeSet<String> clientMessageIds = new TreeSet<String>();
     
     /**
      * Initialize the set of message ids that the network client will use.  



Mime
View raw message