db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1485333 [1/3] - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/jdbc/ iapi/services/io/ iapi/services/loader/ iapi/sql/compile/ iapi/sql/conn/ iapi/sql/dictionary/ iapi/sql/execute/ iapi/transaction/ impl/jdbc/ impl/services/dae...
Date Wed, 22 May 2013 18:51:18 GMT
Author: rhillegas
Date: Wed May 22 18:51:15 2013
New Revision: 1485333

URL: http://svn.apache.org/r1485333
Log:
DERBY-6213: Generify more classes.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DDUtils.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/transaction/TransactionControl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/CursorInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericResultDescription.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnOrdering.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExtractOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByColumn.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IsNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrderedColumnList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Predicate.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PredicateList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNodeVector.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowNumberFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowOrderingImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TestConstraintNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryDateTimestampOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryLogicalOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserAggregateDefinition.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/VTIDeferModPolicy.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/WindowFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/WindowResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregatorInfoList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicSortObserver.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLSingleTableConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/FKInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericRIChecker.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/TriggerEventActivator.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/DRDAServerStarter.java Wed May 22 18:51:15 2013
@@ -80,7 +80,7 @@ public final class DRDAServerStarter imp
 
     private Thread serverThread;
     private static final String serverClassName = "org.apache.derby.impl.drda.NetworkServerControlImpl";
-    private Class serverClass;
+    private Class<?> serverClass;
 	
 	private InetAddress listenAddress =null;
 	private int portNumber = -1;
@@ -137,7 +137,7 @@ public final class DRDAServerStarter imp
      * @throws NoSuchMethodException 
      * @throws SecurityException 
      */
-    private void findStartStopMethods(final Class serverClass)
+    private void findStartStopMethods(final Class<?> serverClass)
         throws SecurityException, NoSuchMethodException
     {
         // Methods are public so no need for privilege blocks.
@@ -179,9 +179,9 @@ public final class DRDAServerStarter imp
             Constructor  serverConstructor;
             try
             {
-                serverConstructor = (Constructor) AccessController.doPrivileged(
-			      new PrivilegedExceptionAction() {
-						  public Object run() throws NoSuchMethodException, SecurityException
+                serverConstructor = AccessController.doPrivileged(
+			      new PrivilegedExceptionAction<Constructor>() {
+						  public Constructor run() throws NoSuchMethodException, SecurityException
 						  {
 							  if (listenAddress == null)
 								  return serverClass.getConstructor(
@@ -260,7 +260,7 @@ public final class DRDAServerStarter imp
 				serverShutdownMethod.invoke( server,
 											 null);
 				AccessController.doPrivileged(
-							      new PrivilegedAction() {
+							      new PrivilegedAction<Object>() {
 								  public Object run() {
 								      serverThread.interrupt();
 								      return null;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml Wed May 22 18:51:15 2013
@@ -58,7 +58,7 @@
       </classpath>
       <include name="${derby.dir}/${cur.dir}/*.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/*42.java"/>
-      <!-- <compilerarg value="-Xlint:unchecked"/> -->
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
   </target> 
 
@@ -80,7 +80,7 @@
               <pathelement path="${java18compile.classpath}"/>
           </classpath>
           <include name="${derby.dir}/${cur.dir}/*42.java"/>
-          <!-- <compilerarg value="-Xlint:unchecked"/> -->
+          <compilerarg value="-Xlint:unchecked"/>
       </javac>
   </target> 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayUtil.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/ArrayUtil.java Wed May 22 18:51:15 2013
@@ -97,10 +97,14 @@ public abstract class ArrayUtil
      * Make the contents of an array available as a read-only list. If the
      * array is null, an empty list will be returned.
      */
-    public static List asReadOnlyList(Object[] array) {
-        return array == null ?
-                Collections.EMPTY_LIST :
-                Collections.unmodifiableList(Arrays.asList(array));
+    @SuppressWarnings("unchecked")
+    public static List<Object> asReadOnlyList(Object[] array) {
+        return (List<Object>)
+            (
+             array == null ?
+             Collections.EMPTY_LIST :
+             Collections.unmodifiableList(Arrays.asList(array))
+             );
     }
 
 	///////////////////////////////////////////////////////////////////

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java Wed May 22 18:51:15 2013
@@ -73,7 +73,7 @@ public class ClassInspector
 	public boolean instanceOf(String className, Object obj)
 		throws ClassNotFoundException
 	{
-		Class clazz = getClass(className);
+		Class<?> clazz = getClass(className);
 		// is className an untyped null
 		if (clazz == null)
 			return false;
@@ -126,7 +126,7 @@ public class ClassInspector
 	public boolean accessible(String className)
 		throws ClassNotFoundException
 	{
-		Class theClass = getClass(className);
+		Class<?> theClass = getClass(className);
 		if (theClass == null)
 			return false;
 
@@ -355,7 +355,7 @@ public class ClassInspector
 		Exception e = null;
 		try {
 
-			Class receiverClass = getClass(receiverType);
+			Class<?> receiverClass = getClass(receiverType);
 			if (receiverClass == null)
 				return null;
 			if (receiverClass.isArray() || receiverClass.isPrimitive()) {
@@ -831,7 +831,7 @@ nextMethod:	for (int i = 0; i < methods.
 		@exception ClassNotFoundException Class cannot be found, or
 		a SecurityException or LinkageException was thrown loading the class.
 	*/
-	public Class getClass(String className) throws ClassNotFoundException {
+	public Class<?> getClass(String className) throws ClassNotFoundException {
 
 		if ((className == null) || 
 			(className.length() == 0))

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/CompilerContext.java Wed May 22 18:51:15 2013
@@ -33,6 +33,7 @@ import org.apache.derby.iapi.sql.diction
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 import org.apache.derby.iapi.sql.dictionary.PrivilegedSQLObject;
 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
+import org.apache.derby.iapi.sql.dictionary.StatementPermission;
 
 import org.apache.derby.iapi.sql.depend.Dependent;
 import org.apache.derby.iapi.sql.depend.Provider;
@@ -342,7 +343,7 @@ public interface CompilerContext extends
 	 * @param objs	 The new saved objects
      * @throws NullPointerException if {@code objs} is null
 	 */
-    void setSavedObjects(List objs);
+    void setSavedObjects(List<Object> objs);
 
 	/**
 	 * Set the in use state for the compiler context.
@@ -576,7 +577,7 @@ public interface CompilerContext extends
 	/**
 	 * @return The list of required privileges.
 	 */
-	public List getRequiredPermissionsList();
+	public List<StatementPermission>getRequiredPermissionsList();
     
 	/**
 	 * Add a sequence descriptor to the list of referenced sequences.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java Wed May 22 18:51:15 2013
@@ -977,7 +977,7 @@ public interface LanguageConnectionConte
 	 * Copy a map of autoincrement key value pairs into the cache of
 	 * ai values stored in the language connection context.
 	 */
-	public void copyHashtableToAIHT(Map<Object,Long> from);
+	public void copyHashtableToAIHT(Map<String,Long> from);
 	
 	/**
 	 * returns the <b>next</b> value to be inserted into an autoincrement col.
@@ -1194,7 +1194,7 @@ public interface LanguageConnectionConte
 	 * @see org.apache.derby.impl.sql.compile.QueryTreeNode#treePrint(int)
 	 * @return the map
 	 */
-    public Map getPrintedObjectsMap();
+    public Map<Object,Object> getPrintedObjectsMap();
 	
     /**
      * sets the XplainOnlyMode.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DDUtils.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DDUtils.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DDUtils.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DDUtils.java Wed May 22 18:51:15 2013
@@ -186,6 +186,7 @@ public	class	DDUtils
 	**checks whether the foreign key relation ships referential action
 	**is violating the restrictions we have in the current system.
 	**/
+    @SuppressWarnings("unchecked")
 	public static void validateReferentialActions
     (
 		DataDictionary	dd,
@@ -226,7 +227,7 @@ public	class	DDUtils
 		//check whether the foreign key relation ships referential action
 		//is not violating the restrictions we have in the current system.
 		TableDescriptor refTd = otherConstraintInfo.getReferencedTableDescriptor(dd);
-		Hashtable deleteConnHashtable = new Hashtable();
+		Hashtable<String,Integer> deleteConnHashtable = new Hashtable<String,Integer>();
 		//find whether the foreign key is self referencing.
 		boolean isSelfReferencingFk = (refTd.getUUID().equals(td.getUUID()));
 		String refTableName = refTd.getSchemaName() + "." + refTd.getName();
@@ -234,7 +235,7 @@ public	class	DDUtils
 		int currentSelfRefValue = getCurrentDeleteConnections(dd, td, -1, deleteConnHashtable, false, true);
 		validateDeleteConnection(dd, td, refTd, 
 								 refAction, 
-								 deleteConnHashtable, (Hashtable) deleteConnHashtable.clone(),
+								 deleteConnHashtable, (Hashtable<String,Integer>) deleteConnHashtable.clone(),
 								 true, myConstraintName, false , 
 								 new StringBuffer(0), refTableName,
 								 isSelfReferencingFk,
@@ -263,7 +264,7 @@ public	class	DDUtils
 	 DataDictionary	dd,
 	 TableDescriptor	td,
 	 int refActionType,
-	 Hashtable dch,
+	 Hashtable<String,Integer> dch,
 	 boolean prevNotCascade,
 	 boolean findSelfRef
 	 )
@@ -366,8 +367,8 @@ public	class	DDUtils
 		TableDescriptor actualTd,  // the table we are adding the foriegn key.
 		TableDescriptor	refTd,
 		int refActionType,
-		Hashtable dch,
-		Hashtable ech,  //existing delete connections
+		Hashtable<String,Integer> dch,
+		Hashtable<String,Integer> ech,  //existing delete connections
 		boolean checkImmediateRefTable,
 		String myConstraintName,
 		boolean prevNotCascade,
@@ -755,7 +756,7 @@ public	class	DDUtils
 	 DataDictionary	dd,
 	 TableDescriptor td,
 	 int refActionType,
-	 Hashtable newDconnHashTable,
+	 Hashtable<String,Integer> newDconnHashTable,
 	 String myConstraintName
 	 )
 	throws StandardException
@@ -788,7 +789,7 @@ public	class	DDUtils
 				
 				//Note: More than one table can refer to the same
 				//ReferencedKeyConstraintDescriptor, so we need to find all the tables.
-				Hashtable dConnHashtable = new Hashtable();
+				Hashtable<String,Integer> dConnHashtable = new Hashtable<String,Integer>();
 				for (int inner = 0; inner < size; inner++)
 				{
 					ForeignKeyConstraintDescriptor fkcd = (ForeignKeyConstraintDescriptor) fkcdl.elementAt(inner);
@@ -814,16 +815,16 @@ public	class	DDUtils
 						**referential action and only one SET NULL path.
 						**/
 
-						for (Enumeration e = dConnHashtable.keys() ; e.hasMoreElements() ;) 
+						for (Enumeration<String> e = dConnHashtable.keys() ; e.hasMoreElements() ;) 
 						{
-							String tName = (String) e.nextElement();
+							String tName = e.nextElement();
 							//we should not check for the table name to which  we are
 							//adding the foreign key relation ship.
 							if(!tName.equals(addTableName))
 							{
 								if(newDconnHashTable.containsKey(tName))
 								{
-									int currentDeleteRule = ((Integer)	dConnHashtable.get(tName)).intValue();
+									int currentDeleteRule = (dConnHashtable.get(tName)).intValue();
 									if((currentDeleteRule == StatementType.RA_SETNULL
 										&& raDeleteRuleToAddTable == StatementType.RA_SETNULL) ||
 									   currentDeleteRule  != raDeleteRuleToAddTable)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java Wed May 22 18:51:15 2013
@@ -1860,7 +1860,7 @@ public interface DataDictionary
 	/**
 	 * Gets all statistics Descriptors for a given table.
 	 */
-	public List getStatisticsDescriptors(TableDescriptor td)
+	public List<StatisticsDescriptor> getStatisticsDescriptors(TableDescriptor td)
 		throws StandardException;
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java Wed May 22 18:51:15 2013
@@ -204,7 +204,7 @@ public class TableDescriptor extends Uni
 
 	/** A list of statistics pertaining to this table-- 
 	 */
-	private List					statisticsDescriptorList;
+	private List<StatisticsDescriptor>					statisticsDescriptorList;
 
 	/**
 	 * Constructor for a TableDescriptor (this is for a temporary table).
@@ -1316,7 +1316,7 @@ public class TableDescriptor extends Uni
 	
 	/** Returns a list of statistics for this table.
 	 */
-	public synchronized List getStatistics() throws StandardException
+	public synchronized List<StatisticsDescriptor> getStatistics() throws StandardException
 	{
 		// if table already has the statistics descriptors initialized
 		// no need to do anything

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/execute/ExecPreparedStatement.java Wed May 22 18:51:15 2013
@@ -69,7 +69,7 @@ public interface ExecPreparedStatement 
 	 *
      *  @return a list with all the saved objects
 	 */
-    List getSavedObjects();
+    List<Object> getSavedObjects();
 
 	/**
 	 *	Get the saved cursor info.  Used for stored prepared

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/transaction/TransactionControl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/transaction/TransactionControl.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/transaction/TransactionControl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/transaction/TransactionControl.java Wed May 22 18:51:15 2013
@@ -71,7 +71,7 @@ public final class TransactionControl {
 		{ "RR", "REPEATABLE READ", "SERIALIZABLE"}
 	};
 
-    private final ArrayList listeners;
+    private final ArrayList<TransactionListener> listeners;
 
     /** Map a Derby isolation level to the corresponding JDBC level */
     public  static  int jdbcIsolationLevel( int derbyIsolationLevel )
@@ -90,7 +90,7 @@ public final class TransactionControl {
     
     public TransactionControl()
     {
-        listeners = new ArrayList();
+        listeners = new ArrayList<TransactionListener>();
     }
     
     /**
@@ -126,10 +126,10 @@ public final class TransactionControl {
         if (listeners.isEmpty())
             return;
         
-        for (Iterator i = listeners.iterator(); i.hasNext(); )
+        for (Iterator<TransactionListener> i = listeners.iterator(); i.hasNext(); )
         {
             TransactionListener listener =
-                (TransactionListener) i.next();
+                i.next();
             
             try {
                 if(listener.preCommit())
@@ -167,10 +167,10 @@ public final class TransactionControl {
         if (listeners.isEmpty())
             return;
         
-        for (Iterator i = listeners.iterator(); i.hasNext(); )
+        for (Iterator<TransactionListener> i = listeners.iterator(); i.hasNext(); )
         {
             TransactionListener listener =
-                (TransactionListener) i.next();
+                i.next();
             
             try {
                 listener.preRollback();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java Wed May 22 18:51:15 2013
@@ -152,7 +152,7 @@ public abstract class EmbedConnection im
 
 	TransactionResourceImpl tr; // always access tr thru getTR()
 
-	private HashMap lobHashMap = null;
+	private HashMap<Integer,Object> lobHashMap = null;
 	private int lobHMKey = 0;
 
     /**
@@ -160,7 +160,7 @@ public abstract class EmbedConnection im
      * connection. These lobs will be cleared after the transaction
      * is no longer valid or when connection is closed
      */
-    private WeakHashMap lobReferences = null;
+    private WeakHashMap<Object,Object> lobReferences = null;
 
     // Set to keep track of the open LOBFiles, so they can be closed at the end of 
     // the transaction. This would normally happen as lobReferences are freed as they
@@ -168,7 +168,7 @@ public abstract class EmbedConnection im
     // possible that finalization will not have occurred before the user tries to 
     // remove the database (DERBY-3655).  Therefore we keep this set so that we can
     // explicitly close the files.
-    private HashSet lobFiles;
+    private HashSet<LOBFile> lobFiles;
     
 	//////////////////////////////////////////////////////////
 	// STATE (copied to new nested connections, but nesting
@@ -3321,9 +3321,9 @@ public abstract class EmbedConnection im
     private void clearLOBMapping() throws SQLException {
 
 		//free all the lob resources in the HashMap
-		Map map = rootConnection.lobReferences;
+		Map<Object,Object> map = rootConnection.lobReferences;
 		if (map != null) {
-            Iterator it = map.keySet ().iterator ();
+            Iterator<Object> it = map.keySet ().iterator ();
             while (it.hasNext()) {
                 ((EngineLOB)it.next()).free();
 			}
@@ -3338,10 +3338,10 @@ public abstract class EmbedConnection im
             // can cause problems further down the road.
 			if (lobFiles != null) {       
                 SQLException firstException = null;
-				Iterator it = lobFiles.iterator();
+				Iterator<LOBFile> it = lobFiles.iterator();
                 while (it.hasNext()) {
                     try {
-                        ((LOBFile) it.next()).close();
+                        (it.next()).close();
                     } catch (IOException ioe) {
                         // Discard all exceptions besides the first one.
                         if (firstException == null) {
@@ -3392,7 +3392,7 @@ public abstract class EmbedConnection im
      */
     void addLOBReference (Object lobReference) {
         if (rootConnection.lobReferences == null) {
-            rootConnection.lobReferences = new WeakHashMap ();
+            rootConnection.lobReferences = new WeakHashMap<Object,Object>();
         }
         rootConnection.lobReferences.put (lobReference, null);
     }
@@ -3401,9 +3401,9 @@ public abstract class EmbedConnection im
 	* Return the Hash Map in the root connection
 	* @return the HashMap that contains the locator to LOB object mapping
 	*/
-	private HashMap getlobHMObj() {
+	private HashMap<Integer,Object> getlobHMObj() {
 		if (rootConnection.lobHashMap == null) {
-			rootConnection.lobHashMap = new HashMap();
+			rootConnection.lobHashMap = new HashMap<Integer,Object>();
 		}
 		return rootConnection.lobHashMap;
 	}
@@ -3433,7 +3433,7 @@ public abstract class EmbedConnection im
 	void addLobFile(LOBFile lobFile) {
 		synchronized (this) {
 			if (lobFiles == null)
-				lobFiles = new HashSet();
+				lobFiles = new HashSet<LOBFile>();
 			lobFiles.add(lobFile);
 		}
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnectionContext.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnectionContext.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnectionContext.java Wed May 22 18:51:15 2013
@@ -48,13 +48,13 @@ class EmbedConnectionContext extends Con
 		collected as modules hold onto the ContextManager and thus there would
 		be a direct reference through this object.
 	*/
-	private java.lang.ref.SoftReference	connRef;
+	private java.lang.ref.SoftReference<EmbedConnection>	connRef;
 
 
 	EmbedConnectionContext(ContextManager cm, EmbedConnection conn) {
 		super(cm, ConnectionContext.CONTEXT_ID);
 
-		connRef = new java.lang.ref.SoftReference(conn);
+		connRef = new java.lang.ref.SoftReference<EmbedConnection>(conn);
 	}
 
 	public void cleanupOnError(Throwable error) {
@@ -62,7 +62,7 @@ class EmbedConnectionContext extends Con
 		if (connRef == null)
 			return;
 
-		EmbedConnection conn = (EmbedConnection) connRef.get();
+		EmbedConnection conn = connRef.get();
 
 		if (error instanceof StandardException) {
 
@@ -102,7 +102,7 @@ class EmbedConnectionContext extends Con
 	*/
 	public java.sql.Connection getNestedConnection(boolean internal) throws SQLException {
 
-		EmbedConnection conn = (EmbedConnection) connRef.get();
+		EmbedConnection conn = connRef.get();
 
 		if ((conn == null) || conn.isClosed())
 			throw Util.noCurrentConnection();
@@ -127,7 +127,7 @@ class EmbedConnectionContext extends Con
 		ResultSet 				executionResultSet
 	) throws SQLException
 	{
-		EmbedConnection conn = (EmbedConnection) connRef.get();
+		EmbedConnection conn = connRef.get();
 
 		EmbedResultSet rs = conn.getLocalDriver().newEmbedResultSet(conn, executionResultSet, 
 							false, (EmbedStatement) null, true);
@@ -146,7 +146,7 @@ class EmbedConnectionContext extends Con
      *   @see EmbedStatement#processDynamicResult(EmbedConnection, java.sql.ResultSet, EmbedStatement)
      */
     public boolean processInaccessibleDynamicResult(java.sql.ResultSet resultSet) {
-        EmbedConnection conn = (EmbedConnection) connRef.get();
+        EmbedConnection conn = connRef.get();
         if (conn == null)
             return false;
         

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java Wed May 22 18:51:15 2013
@@ -1051,7 +1051,7 @@ public abstract class EmbedPreparedState
 	  // away
   	  synchronized (getConnectionSynchronization()) {
   			if (batchStatements == null)
-  				batchStatements = new Vector();
+  				batchStatements = new Vector<Object>();
 
           //get a clone of the parameterValueSet and save it in the vector
           //which will be used later on at the time of batch execution.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java Wed May 22 18:51:15 2013
@@ -105,7 +105,7 @@ public abstract class EmbedStatement ext
 
     //in case of batch update, save the individual statements in the batch in this vector
  	//this is only used by JDBC 2.0
- 	Vector batchStatements;
+ 	Vector<Object> batchStatements;
 	
 	// The maximum # of rows to return per result set.
 	// (0 means no limit.)
@@ -1005,7 +1005,7 @@ public abstract class EmbedStatement ext
 		checkStatus();
   	  synchronized (getConnectionSynchronization()) {
 		  if (batchStatements == null)
-			  batchStatements = new Vector();
+			  batchStatements = new Vector<Object>();
         batchStatements.add(sql);
   		}
 	}
@@ -1069,7 +1069,7 @@ public abstract class EmbedStatement ext
 			// setup and restore themselves.
 			clearResultSets();
 
-			Vector stmts = batchStatements;
+			Vector<Object> stmts = batchStatements;
 			batchStatements = null;
 			int size;
 			if (stmts == null)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/LOBStreamControl.java Wed May 22 18:51:15 2013
@@ -98,7 +98,7 @@ final class LOBStreamControl {
         final DataFactory df = (DataFactory) Monitor.findServiceModule(
                 monitor, DataFactory.MODULE);
         try {
-            AccessController.doPrivileged (new PrivilegedExceptionAction() {
+            AccessController.doPrivileged (new PrivilegedExceptionAction<Object>() {
                 public Object run() throws IOException {
                     //create a temporary file
                     StorageFile lobFile =
@@ -494,7 +494,7 @@ final class LOBStreamControl {
     }
 
     private void deleteFile(final StorageFile file) {
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
                 file.delete();
                 return null;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/IndexStatisticsDaemonImpl.java Wed May 22 18:51:15 2013
@@ -160,7 +160,7 @@ public class IndexStatisticsDaemonImpl
      * Note that the descriptor isn't removed before the work has
      * been completed.
      */
-    private final ArrayList queue = new ArrayList(MAX_QUEUE_LENGTH);
+    private final ArrayList<TableDescriptor> queue = new ArrayList<TableDescriptor>(MAX_QUEUE_LENGTH);
     /**
      * The thread in which the index statistics refresh operation is being
      * executed, if any. Created as needed, but there will only be one
@@ -306,7 +306,7 @@ public class IndexStatisticsDaemonImpl
             // duplicates should yield acceptable performance. Also, we don't
             // look for duplicates if the queue is already full.
             for (int i=0; i < queue.size(); i++) {
-                TableDescriptor work = (TableDescriptor)queue.get(i);
+                TableDescriptor work = queue.get(i);
                 if (work.tableNameEquals(table, schema)) {
                     accept = false;
                     break;
@@ -472,7 +472,7 @@ public class IndexStatisticsDaemonImpl
         // Note that the algorithm would drop valid statistics entries if
         // working on a subset of the table conglomerates/indexes.
         if (identifyDisposableStats) {
-            List existingStats = td.getStatistics();
+            List<StatisticsDescriptor> existingStats = td.getStatistics();
             StatisticsDescriptor[] stats = (StatisticsDescriptor[])
                     existingStats.toArray(
                         new StatisticsDescriptor[existingStats.size()]);
@@ -891,7 +891,7 @@ public class IndexStatisticsDaemonImpl
                         trace(1, "queue empty");
                         break;
                     }
-                    td = (TableDescriptor)queue.get(0);
+                    td = queue.get(0);
                 }
                 try {
                     start = System.currentTimeMillis();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/CursorInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/CursorInfo.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/CursorInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/CursorInfo.java Wed May 22 18:51:15 2013
@@ -59,7 +59,7 @@ public class CursorInfo
 	********************************************************/
 
 	ExecCursorTableReference	targetTable; 
-    List                        updateColumns;
+    List<String>          updateColumns;
 	int 						updateMode;
 
 	/**
@@ -76,13 +76,13 @@ public class CursorInfo
 	(
 		int							updateMode,
 		ExecCursorTableReference	targetTable,
-        List                        updateColumns
+        List<String>             updateColumns
 	)
 	{
 		this.updateMode = updateMode;
 		this.targetTable = targetTable;
         this.updateColumns = (updateColumns == null) ?
-                null : new ArrayList(updateColumns);
+                updateColumns : new ArrayList<String>(updateColumns);
 	}
 
 	//////////////////////////////////////////////

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericPreparedStatement.java Wed May 22 18:51:15 2013
@@ -128,7 +128,7 @@ public class GenericPreparedStatement
 
 	// fields used for cursors
 	protected ExecCursorTableReference	targetTable; 
-    protected List                      updateColumns;
+    protected List<String>           updateColumns;
 	protected int 						updateMode;
 
 	protected ConstantAction	executionConstants;
@@ -733,7 +733,7 @@ recompileOutOfDatePlan:
 	 *
 	 *	@return all the saved objects
 	 */
-    public final List getSavedObjects()
+    public final List<Object> getSavedObjects()
 	{
         // Return an unmodifiable view of the underlying array, so that
         // the caller cannot modify the internal state.
@@ -1286,7 +1286,7 @@ recompileOutOfDatePlan:
     private static class RowCountStatistics {
         private int stalePlanCheckInterval;
         private int executionCount;
-        private ArrayList rowCounts;
+        private ArrayList<Long> rowCounts;
 
         // No synchronization for executionCount. Since it's accessed on
         // every execution, we want to avoid synchronization. Nothing serious
@@ -1307,7 +1307,7 @@ recompileOutOfDatePlan:
         synchronized long getInitialRowCount(int rsNum, long rowCount) {
             // Allocate the list of row counts lazily.
             if (rowCounts == null) {
-                rowCounts = new ArrayList();
+                rowCounts = new ArrayList<Long>();
             }
 
             // Make sure the list is big enough to hold the row count for
@@ -1315,12 +1315,12 @@ recompileOutOfDatePlan:
             if (rsNum >= rowCounts.size()) {
                 int newSize = rsNum + 1;
                 rowCounts.addAll(
-                        Collections.nCopies(newSize - rowCounts.size(), null));
+                                 Collections.nCopies(newSize - rowCounts.size(), (Long) null));
             }
 
             // Get the initial row count for the specified result set, and
             // set it if it is not already set.
-            Long initialCount = (Long) rowCounts.get(rsNum);
+            Long initialCount = rowCounts.get(rsNum);
             if (initialCount == null) {
                 rowCounts.set(rsNum, ReuseFactory.getLong(rowCount));
                 return rowCount;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericResultDescription.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericResultDescription.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericResultDescription.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/GenericResultDescription.java Wed May 22 18:51:15 2013
@@ -80,7 +80,7 @@ public final class GenericResultDescript
      * A map which maps a column name to a column number.
      * Entries only added when accessing columns with the name.
      */
-    private Map columnNameMap;
+    private Map<String,Integer> columnNameMap;
 	
 	/**
 	 * Niladic constructor for Formatable
@@ -303,14 +303,14 @@ public final class GenericResultDescript
      */
     public int findColumnInsenstive(String columnName) {
         
-        final Map workMap; 
+        final Map<String,Integer> workMap; 
         
         synchronized (this) {
             if (columnNameMap==null) {
                 // updateXXX and getXXX methods are case insensitive and the 
                 // first column should be returned. The loop goes backward to 
                 // create a map which preserves this property.
-                Map map = new HashMap();
+                Map<String,Integer> map = new HashMap<String,Integer>();
                 for (int i = getColumnCount(); i>=1; i--) {
                     
                     final String key = StringUtil.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java Wed May 22 18:51:15 2013
@@ -5757,7 +5757,7 @@ public final class	DataDictionaryImpl
      * @param td {@code TableDescriptor} for which I need statistics
      * @return A list of tuple descriptors, possibly empty.
      */
-	public List getStatisticsDescriptors(TableDescriptor td)
+	public List<StatisticsDescriptor> getStatisticsDescriptors(TableDescriptor td)
 		throws StandardException
 	{
 		TabInfoImpl ti = getNonCoreTI(SYSSTATISTICS_CATALOG_NUM);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java Wed May 22 18:51:15 2013
@@ -266,7 +266,7 @@ public class AggregateNode extends Unary
 	 * @exception StandardException		Thrown on error
 	 */
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
         DataDictionary  dd = getDataDictionary();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java Wed May 22 18:51:15 2013
@@ -59,7 +59,7 @@ public final class AggregateWindowFuncti
      * @see ValueNode#bindExpression
      */
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
             throws StandardException
     {
         aggregateFunction.bindExpression(

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java Wed May 22 18:51:15 2013
@@ -59,7 +59,7 @@ public class AndNode extends BinaryLogic
 	 */
 
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
         super.bindExpression(fromList, subqueryList, aggregates);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java Wed May 22 18:51:15 2013
@@ -117,7 +117,7 @@ public final class BinaryArithmeticOpera
 	 */
 
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
         super.bindExpression(fromList, subqueryList, aggregates);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java Wed May 22 18:51:15 2013
@@ -133,7 +133,7 @@ public abstract class BinaryComparisonOp
 	 */
 
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
         super.bindExpression(fromList, subqueryList, aggregates);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java Wed May 22 18:51:15 2013
@@ -135,7 +135,7 @@ public abstract class BinaryListOperator
 	 */
 
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
         leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregates);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java Wed May 22 18:51:15 2013
@@ -73,7 +73,7 @@ abstract class BinaryLogicalOperatorNode
 	 */
 
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
 		//following is to check if we have something like "? AND 1=1" or "2>1 OR ?" 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java Wed May 22 18:51:15 2013
@@ -280,7 +280,7 @@ public class BinaryOperatorNode extends 
 	 */
 
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
 		leftOperand = leftOperand.bindExpression(fromList, subqueryList, 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java Wed May 22 18:51:15 2013
@@ -195,7 +195,7 @@ public class CastNode extends ValueNode
 	 * @exception StandardException		Thrown on error
 	 */
 
-    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
+    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 				throws StandardException
 	{
 		castOperand = castOperand.bindExpression(

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java Wed May 22 18:51:15 2013
@@ -135,7 +135,7 @@ public class CoalesceFunctionNode extend
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
+    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 					throws StandardException
 	{
 		//bind all the arguments

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CollectNodesVisitor.java Wed May 22 18:51:15 2013
@@ -89,6 +89,7 @@ public class CollectNodesVisitor<T exten
 	 *
 	 * @return me
 	 */
+    @SuppressWarnings("unchecked")
 	public Visitable visit(Visitable node)
 	{
 		if (nodeClass.isInstance(node))

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java Wed May 22 18:51:15 2013
@@ -614,7 +614,7 @@ public class ColumnDefinitionNode extend
 								getNodeFactory().doJoinOrderOptimization(),
 								getContextManager()), 
 							(SubqueryList) null,
-							(List) null);
+							(List<AggregateNode>) null);
 
 			TypeId columnTypeId = getType().getTypeId();
 			TypeId defaultTypeId = defaultTree.getTypeId();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnOrdering.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnOrdering.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnOrdering.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnOrdering.java Wed May 22 18:51:15 2013
@@ -32,13 +32,13 @@ class ColumnOrdering {
 	int	myDirection;
 
     /** A list of column numbers (Integers). */
-    private final ArrayList columns = new ArrayList();
+    private final ArrayList<Integer> columns = new ArrayList<Integer>();
 
     /**
      * A list of table numbers (Integers), corresponding to the {@code columns}
      * list by position.
      */
-    private final ArrayList tables = new ArrayList();
+    private final ArrayList<Integer> tables = new ArrayList<Integer>();
 
 	/**
 	 * @param direction	See RowOrdering for possible values
@@ -81,8 +81,8 @@ class ColumnOrdering {
 	boolean contains(int tableNumber, int columnNumber)
 	{
 		for (int i = 0; i < columns.size(); i++) {
-			Integer col = (Integer) columns.get(i);
-			Integer tab = (Integer) tables.get(i);
+			Integer col = columns.get(i);
+			Integer tab = tables.get(i);
 
 			if (tab.intValue() == tableNumber &&
 				col.intValue() == columnNumber) {
@@ -125,7 +125,7 @@ class ColumnOrdering {
 		*/
 		for (int i = tables.size() - 1; i >= 0; i--)
 		{
-			Integer tab = (Integer) tables.get(i);
+			Integer tab = tables.get(i);
 			if (tab.intValue() == tableNumber)
 			{
 				tables.remove(i);
@@ -164,7 +164,7 @@ class ColumnOrdering {
 	boolean hasAnyOtherTable(int tableNumber) {
 
 		for (int i = 0; i < tables.size(); i++) {
-			Integer tab = (Integer) tables.get(i);
+			Integer tab = tables.get(i);
 			
 			if (tab.intValue() != tableNumber)
 				return true;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java Wed May 22 18:51:15 2013
@@ -109,7 +109,7 @@ public class ColumnReference extends Val
 	/* List of saved remap data if this ColumnReference is scoped
 	   and has been remapped multiple times.
 	 */
-	private java.util.ArrayList remaps;
+	private java.util.ArrayList<RemapInfo> remaps;
 
 	/**
 	 * Initializer.
@@ -702,7 +702,7 @@ public class ColumnReference extends Val
 		if (scoped && (origSource != null))
 		{
 			if (remaps == null)
-				remaps = new java.util.ArrayList();
+				remaps = new java.util.ArrayList<RemapInfo>();
 			remaps.add(new RemapInfo(
 				columnNumber, tableNumber, columnName, source));
 		}
@@ -763,7 +763,7 @@ public class ColumnReference extends Val
 		{
 			// This CR is multiply-remapped, so undo the most
 			// recent (and only the most recent) remap operation.
-			RemapInfo rI = (RemapInfo)remaps.remove(remaps.size() - 1);
+			RemapInfo rI = remaps.remove(remaps.size() - 1);
 			source = rI.getSource();
 			columnName = rI.getColumnName();
 			tableNumber = rI.getTableNumber();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java Wed May 22 18:51:15 2013
@@ -41,6 +41,7 @@ import org.apache.derby.iapi.sql.diction
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
 import org.apache.derby.iapi.sql.dictionary.PermDescriptor;
 import org.apache.derby.iapi.sql.dictionary.PrivilegedSQLObject;
+import org.apache.derby.iapi.sql.dictionary.StatementPermission;
 import org.apache.derby.iapi.sql.dictionary.StatementGenericPermission;
 import org.apache.derby.iapi.sql.dictionary.StatementTablePermission;
 import org.apache.derby.iapi.sql.dictionary.StatementSchemaPermission;
@@ -331,7 +332,7 @@ public class CompilerContextImpl extends
 
 	public int addSavedObject(Object obj) {
         if (savedObjects == null) {
-            savedObjects = new ArrayList();
+            savedObjects = new ArrayList<Object>();
         }
 
 		savedObjects.add(obj);
@@ -347,9 +348,9 @@ public class CompilerContextImpl extends
 	}
 
 	/** @see CompilerContext#setSavedObjects */
-    public void setSavedObjects(List objs)
+    public void setSavedObjects(List<Object> objs)
 	{
-        Iterator it = objs.iterator();
+        Iterator<Object> it = objs.iterator();
         while (it.hasNext()) {
             addSavedObject(it.next());
         }
@@ -441,7 +442,7 @@ public class CompilerContextImpl extends
 
         // Try to find the given conglomerate number among the already
         // opened conglomerates.
-        StoreCostController retval = (StoreCostController)
+        StoreCostController retval =
                 storeCostControllers.get(conglomNum);
 
         if (retval == null) {
@@ -459,10 +460,10 @@ public class CompilerContextImpl extends
 	 */
 	private void closeStoreCostControllers()
 	{
-        Iterator it = storeCostControllers.values().iterator();
+        Iterator<StoreCostController> it = storeCostControllers.values().iterator();
         while (it.hasNext())
 		{
-            StoreCostController scc = (StoreCostController) it.next();
+            StoreCostController scc = it.next();
 			try {
 				scc.close();
 			} catch (StandardException se) {
@@ -540,7 +541,7 @@ public class CompilerContextImpl extends
 	public void pushCompilationSchema(SchemaDescriptor sd)
 	{
 		if (defaultSchemaStack == null) {
-			defaultSchemaStack = new ArrayList(2);
+			defaultSchemaStack = new ArrayList<SchemaDescriptor>(2);
 		}
 
 		defaultSchemaStack.add(defaultSchemaStack.size(),
@@ -554,7 +555,7 @@ public class CompilerContextImpl extends
 	public void popCompilationSchema()
 	{
 		SchemaDescriptor sd =
-			(SchemaDescriptor)defaultSchemaStack.remove(
+			defaultSchemaStack.remove(
 				defaultSchemaStack.size() - 1);
 		setCompilationSchema(sd);
 	}
@@ -690,12 +691,12 @@ public class CompilerContextImpl extends
 		getContextManager().getContext(LanguageConnectionContext.CONTEXT_ID);
 		if( lcc.usesSqlAuthorization())
 		{
-			requiredColumnPrivileges = new HashMap();
-			requiredTablePrivileges = new HashMap();
-			requiredSchemaPrivileges = new HashMap();
-			requiredRoutinePrivileges = new HashMap();
-			requiredUsagePrivileges = new HashMap();
-			requiredRolePrivileges = new HashMap();
+			requiredColumnPrivileges = new HashMap<StatementTablePermission,StatementColumnPermission>();
+			requiredTablePrivileges = new HashMap<StatementTablePermission,StatementTablePermission>();
+			requiredSchemaPrivileges = new HashMap<StatementSchemaPermission,StatementSchemaPermission>();
+			requiredRoutinePrivileges = new HashMap<UUID,Integer>();
+			requiredUsagePrivileges = new HashMap<UUID,String>();
+			requiredRolePrivileges = new HashMap<StatementRolePermission,StatementRolePermission>();
 		}
 	} // end of initRequiredPriv
 
@@ -715,7 +716,7 @@ public class CompilerContextImpl extends
 
 	public void popCurrentPrivType( )
 	{
-        Integer top = (Integer) privTypeStack.remove(privTypeStack.size() - 1);
+        Integer top = privTypeStack.remove(privTypeStack.size() - 1);
         currPrivType = top.intValue();
 	}
 
@@ -770,7 +771,7 @@ public class CompilerContextImpl extends
 			StatementTablePermission key = new StatementTablePermission( 
 					tableUUID, Authorizer.SELECT_PRIV);
 			StatementColumnPermission tableColumnPrivileges
-			  = (StatementColumnPermission) requiredColumnPrivileges.get( key);
+			  = requiredColumnPrivileges.get( key);
 			if( tableColumnPrivileges != null)
 				return;
 		}
@@ -783,14 +784,14 @@ public class CompilerContextImpl extends
 			StatementTablePermission key = new StatementTablePermission( 
 					tableUUID, Authorizer.MIN_SELECT_PRIV);
 			StatementColumnPermission tableColumnPrivileges
-			  = (StatementColumnPermission) requiredColumnPrivileges.get( key);
+			  = requiredColumnPrivileges.get( key);
 			if( tableColumnPrivileges != null)
 				requiredColumnPrivileges.remove(key);
 		}
 		
 		StatementTablePermission key = new StatementTablePermission( tableUUID, currPrivType);
 		StatementColumnPermission tableColumnPrivileges
-		  = (StatementColumnPermission) requiredColumnPrivileges.get( key);
+		  = requiredColumnPrivileges.get( key);
 		if( tableColumnPrivileges == null)
 		{
 			tableColumnPrivileges = new StatementColumnPermission( tableUUID,
@@ -825,7 +826,7 @@ public class CompilerContextImpl extends
 			StatementTablePermission key = new StatementTablePermission( 
 					table.getUUID(), Authorizer.MIN_SELECT_PRIV);
 			StatementColumnPermission tableColumnPrivileges
-			  = (StatementColumnPermission) requiredColumnPrivileges.get( key);
+			  = requiredColumnPrivileges.get( key);
 			if( tableColumnPrivileges != null)
 				requiredColumnPrivileges.remove(key);
 		}
@@ -904,7 +905,7 @@ public class CompilerContextImpl extends
 	/**
 	 * @return The list of required privileges.
 	 */
-	public List getRequiredPermissionsList()
+	public List<StatementPermission> getRequiredPermissionsList()
 	{
 		int size = 0;
 		if( requiredRoutinePrivileges != null)
@@ -920,49 +921,49 @@ public class CompilerContextImpl extends
 		if( requiredRolePrivileges != null)
         { size += requiredRolePrivileges.size(); }
 		
-		ArrayList list = new ArrayList( size);
+		ArrayList<StatementPermission> list = new ArrayList<StatementPermission>( size);
 		if( requiredRoutinePrivileges != null)
 		{
-			for( Iterator itr = requiredRoutinePrivileges.keySet().iterator(); itr.hasNext();)
+			for( Iterator<UUID> itr = requiredRoutinePrivileges.keySet().iterator(); itr.hasNext();)
 			{
-				UUID routineUUID = (UUID) itr.next();
+				UUID routineUUID = itr.next();
 				
 				list.add( new StatementRoutinePermission( routineUUID));
 			}
 		}
 		if( requiredUsagePrivileges != null)
 		{
-			for( Iterator itr = requiredUsagePrivileges.keySet().iterator(); itr.hasNext();)
+			for( Iterator<UUID> itr = requiredUsagePrivileges.keySet().iterator(); itr.hasNext();)
 			{
-				UUID objectID = (UUID) itr.next();
+				UUID objectID = itr.next();
 				
 				list.add( new StatementGenericPermission( objectID, (String) requiredUsagePrivileges.get( objectID ), PermDescriptor.USAGE_PRIV ) );
 			}
 		}
 		if( requiredTablePrivileges != null)
 		{
-			for( Iterator itr = requiredTablePrivileges.values().iterator(); itr.hasNext();)
+			for( Iterator<StatementTablePermission> itr = requiredTablePrivileges.values().iterator(); itr.hasNext();)
 			{
 				list.add( itr.next());
 			}
 		}
 		if( requiredSchemaPrivileges != null)
 		{
-			for( Iterator itr = requiredSchemaPrivileges.values().iterator(); itr.hasNext();)
+			for( Iterator<StatementSchemaPermission> itr = requiredSchemaPrivileges.values().iterator(); itr.hasNext();)
 			{
 				list.add( itr.next());
 			}
 		}
 		if( requiredColumnPrivileges != null)
 		{
-			for( Iterator itr = requiredColumnPrivileges.values().iterator(); itr.hasNext();)
+			for( Iterator<StatementColumnPermission> itr = requiredColumnPrivileges.values().iterator(); itr.hasNext();)
 			{
 				list.add( itr.next());
 			}
 		}
 		if( requiredRolePrivileges != null)
 		{
-			for( Iterator itr = requiredRolePrivileges.values().iterator();
+			for( Iterator<StatementRolePermission> itr = requiredRolePrivileges.values().iterator();
 				 itr.hasNext();)
 			{
 				list.add( itr.next());
@@ -973,7 +974,7 @@ public class CompilerContextImpl extends
 
 	public void addReferencedSequence( SequenceDescriptor sd )
     {
-        if ( referencedSequences == null ) { referencedSequences = new HashMap(); }
+        if ( referencedSequences == null ) { referencedSequences = new HashMap<UUID,SequenceDescriptor>(); }
 
         referencedSequences.put( sd.getUUID(), sd );
     }
@@ -1008,7 +1009,7 @@ public class CompilerContextImpl extends
 	private int					scanIsolationLevel;
 	private int					nextEquivalenceClass = -1;
 	private long				nextClassName;
-	private List				savedObjects;
+	private List<Object>				savedObjects;
 	private String				classPrefix;
 	private SchemaDescriptor	compilationSchema;
 
@@ -1016,7 +1017,7 @@ public class CompilerContextImpl extends
 	 * Saved execution time default schema, if we need to change it
 	 * temporarily.
 	 */
-	private ArrayList        	defaultSchemaStack;
+	private ArrayList<SchemaDescriptor>        	defaultSchemaStack;
 
 	private ProviderList		currentAPL;
 	private boolean returnParameterFlag;
@@ -1025,7 +1026,7 @@ public class CompilerContextImpl extends
      * Map that contains all store cost controllers opened in this compiler
      * context. Conglomerate id (long) is the key.
      */
-    private final HashMap storeCostControllers = new HashMap();
+    private final HashMap<Long,StoreCostController> storeCostControllers = new HashMap<Long,StoreCostController>();
 
 	private SortCostController	sortCostController;
 
@@ -1038,13 +1039,13 @@ public class CompilerContextImpl extends
 
 	private SQLWarning warnings;
 
-	private final ArrayList privTypeStack = new ArrayList();
+	private final ArrayList<Integer> privTypeStack = new ArrayList<Integer>();
 	private int currPrivType = Authorizer.NULL_PRIV;
-	private HashMap requiredColumnPrivileges;
-	private HashMap requiredTablePrivileges;
-	private HashMap requiredSchemaPrivileges;
-	private HashMap requiredRoutinePrivileges;
-	private HashMap requiredUsagePrivileges;
-	private HashMap requiredRolePrivileges;
-    private HashMap referencedSequences;
+	private HashMap<StatementTablePermission,StatementColumnPermission> requiredColumnPrivileges;
+	private HashMap<StatementTablePermission,StatementTablePermission> requiredTablePrivileges;
+	private HashMap<StatementSchemaPermission,StatementSchemaPermission> requiredSchemaPrivileges;
+	private HashMap<UUID,Integer> requiredRoutinePrivileges;
+	private HashMap<UUID,String> requiredUsagePrivileges;
+	private HashMap<StatementRolePermission,StatementRolePermission> requiredRolePrivileges;
+    private HashMap<UUID,SequenceDescriptor> referencedSequences;
 } // end of class CompilerContextImpl

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java Wed May 22 18:51:15 2013
@@ -96,7 +96,7 @@ public class ConcatenationOperatorNode e
 	 * @exception StandardException
 	 *                thrown on failure
 	 */
-    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
+    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException {
 		// deal with binding operands
 		leftOperand = leftOperand.bindExpression(fromList, subqueryList,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java Wed May 22 18:51:15 2013
@@ -196,7 +196,7 @@ public class ConditionalNode extends Val
 	 * @exception             StandardException Thrown on error.
 	 */
 	private DataTypeDescriptor findType(ValueNodeList thenElseList,
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 		throws StandardException
 	{
 		/* We need to "prebind" because we want the Types.  Provide
@@ -282,7 +282,7 @@ public class ConditionalNode extends Val
 	 */
 	private void recastNullNodes(ValueNodeList thenElseList,
 	                           DataTypeDescriptor castType, FromList fromList,
-                               SubqueryList subqueryList, List aggregates)
+                               SubqueryList subqueryList, List<AggregateNode> aggregates)
 	 throws StandardException {
 
 		// Don't do anything if we couldn't find a castType.
@@ -366,7 +366,7 @@ public class ConditionalNode extends Val
 	 * @exception StandardException		Thrown on error
 	 */
 
-    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
+    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
         CompilerContext cc = getCompilerContext();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java Wed May 22 18:51:15 2013
@@ -63,13 +63,13 @@ public class CursorNode extends DMLState
 	** There can only be a list of updatable columns when FOR UPDATE
 	** is specified as part of the cursor specification.
 	*/
-	private List updatableColumns;
+	private List<String> updatableColumns;
 	private FromTable updateTable;
     /**
      * List of {@code TableDescriptor}s for base tables whose associated
      * indexes should be checked for stale statistics.
      */
-    private ArrayList statsToUpdate;
+    private ArrayList<TableDescriptor> statsToUpdate;
     private boolean checkIndexStats;
 
 	//If cursor references session schema tables, save the list of those table names in savedObjects in compiler context
@@ -97,7 +97,7 @@ public class CursorNode extends DMLState
 	 *			provided if the updateMode parameter is
 	 *			CursorNode.UPDATE.
 	 */
-
+    @SuppressWarnings("unchecked")
 	public	void init(
 		Object statementType,
 		Object resultSet,
@@ -118,7 +118,7 @@ public class CursorNode extends DMLState
         this.hasJDBClimitClause = (hasJDBClimitClause == null) ? false : ((Boolean) hasJDBClimitClause).booleanValue();
 
 		this.updateMode = ((Integer) updateMode).intValue();
-		this.updatableColumns = (List) updatableColumns;
+		this.updatableColumns = (List<String>) updatableColumns;
 
 		/*
 		** This is a sanity check and not an error since the parser
@@ -384,7 +384,7 @@ public class CursorNode extends DMLState
 		{
 			//If this cursor has references to session schema tables, save the names of those tables into compiler context
 			//so they can be passed to execution phase.
-			ArrayList sessionSchemaTableNames = getSessionSchemaTableNamesForCursor();
+			ArrayList<String> sessionSchemaTableNames = getSessionSchemaTableNamesForCursor();
 			if (sessionSchemaTableNames != null)
 				indexOfSessionTableNamesInSavedObjects = getCompilerContext().addSavedObject(sessionSchemaTableNames);
 		}
@@ -422,7 +422,7 @@ public class CursorNode extends DMLState
         if (checkIndexStats &&
                 td.getTableType() == TableDescriptor.BASE_TABLE_TYPE) {
             if (statsToUpdate == null) {
-                statsToUpdate = new ArrayList();
+                statsToUpdate = new ArrayList<TableDescriptor>();
             }
             statsToUpdate.add(td);
         }
@@ -445,13 +445,13 @@ public class CursorNode extends DMLState
 	//Check if this cursor references any session schema tables. If so, pass those names to execution phase through savedObjects
 	//This list will be used to check if there are any holdable cursors referencing temporary tables at commit time.
 	//If yes, then the data in those temporary tables should be preserved even if they are declared with ON COMMIT DELETE ROWS option
-	protected ArrayList getSessionSchemaTableNamesForCursor()
+	protected ArrayList<String> getSessionSchemaTableNamesForCursor()
 		throws StandardException
 	{
 		FromList fromList = resultSet.getFromList();
 		int fromListSize = fromList.size();
 		FromTable fromTable;
-		ArrayList sessionSchemaTableNames = null;
+		ArrayList<String> sessionSchemaTableNames = null;
 
 		for( int i = 0; i < fromListSize; i++)
 		{
@@ -459,7 +459,7 @@ public class CursorNode extends DMLState
 			if (fromTable instanceof FromBaseTable && isSessionSchema(fromTable.getTableDescriptor().getSchemaDescriptor()))
 			{
 				if (sessionSchemaTableNames == null)
-					sessionSchemaTableNames = new ArrayList();
+					sessionSchemaTableNames = new ArrayList<String>();
 				sessionSchemaTableNames.add(fromTable.getTableName().getTableName());
 			}
 		}
@@ -732,7 +732,7 @@ public class CursorNode extends DMLState
 
 		for (int index = 0; index < size; index++)
 		{
-		    columnName = (String) updatableColumns.get(index);
+		    columnName = updatableColumns.get(index);
 		    tableDescriptor = targetTable.getTableDescriptor();
 		    if ( tableDescriptor.getColumnDescriptor(columnName) == null)
 		    {
@@ -777,7 +777,7 @@ public class CursorNode extends DMLState
         // Iterate backwards to remove elements, chances are high the stats are
         // mostly up-to-date (minor performance optimization to avoid copy).
         for (int i=statsToUpdate.size() -1; i >= 0; i--) {
-            TableDescriptor td = (TableDescriptor)statsToUpdate.get(i);
+            TableDescriptor td = statsToUpdate.get(i);
             if (td.getAndClearIndexStatsIsUpToDate()) {
                 statsToUpdate.remove(i);
             }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java Wed May 22 18:51:15 2013
@@ -72,7 +72,7 @@ public final class DB2LengthOperatorNode
 	 */
 
     ValueNode bindExpression(
-        FromList fromList, SubqueryList subqueryList, List aggregates)
+        FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 			throws StandardException
 	{
         bindOperand( fromList, subqueryList, aggregates);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java Wed May 22 18:51:15 2013
@@ -747,7 +747,7 @@ abstract class DMLModStatementNode exten
 		expression = expression.bindExpression(
 										fakeFromList,
 										(SubqueryList) null,
-										(List) null);
+										(List<AggregateNode>) null);
 	}
 
 	/**
@@ -876,7 +876,7 @@ abstract class DMLModStatementNode exten
     )
 		throws StandardException
 	{
-        ArrayList                           fkList = new ArrayList();
+        ArrayList<FKInfo>         fkList = new ArrayList<FKInfo>();
 		int 								type;
 		UUID[] 								uuids = null;
 		long[] 								conglomNumbers = null;
@@ -887,11 +887,11 @@ abstract class DMLModStatementNode exten
 		ConstraintDescriptorList			activeList = dd.getActiveConstraintDescriptors(cdl);
 		int[]								rowMap = getRowMap(readColsBitSet, td);
 		int[]                               raRules = null;
-		ArrayList                           refTableNames = new ArrayList(1);
-		ArrayList                           refIndexConglomNum = new ArrayList(1);
-		ArrayList                           refActions = new ArrayList(1);
-		ArrayList                           refColDescriptors = new ArrayList(1);
-		ArrayList                           fkColMap = new ArrayList(1);
+		ArrayList<String>              refTableNames = new ArrayList<String>(1);
+		ArrayList<Long>               refIndexConglomNum = new ArrayList<Long>(1);
+		ArrayList<Integer>            refActions = new ArrayList<Integer>(1);
+		ArrayList<ColumnDescriptorList> refColDescriptors = new ArrayList<ColumnDescriptorList>(1);
+		ArrayList<int[]>                fkColMap = new ArrayList<int[]>(1);
 		int activeSize = activeList.size();
 		for (int index = 0; index < activeSize; index++)
 		{
@@ -1020,13 +1020,13 @@ abstract class DMLModStatementNode exten
 			fkColArrays = new int[size][];
 			for (int i = 0; i < size; i++)
 			{
-				fkTableNames[i] = (String)refTableNames.get(i);
-				fkRefActions[i]  = ((Integer) refActions.get(i)).intValue();
+				fkTableNames[i] = refTableNames.get(i);
+				fkRefActions[i]  = (refActions.get(i)).intValue();
 				fkColDescriptors[i] =
-					(ColumnDescriptorList)refColDescriptors.get(i);
+					refColDescriptors.get(i);
 				fkIndexConglomNumbers[i] =
-					((Long)refIndexConglomNum.get(i)).longValue();
-				fkColArrays[i] = ((int[])fkColMap.get(i));
+					(refIndexConglomNum.get(i)).longValue();
+				fkColArrays[i] = (fkColMap.get(i));
 			}
 		}		
 
@@ -1674,7 +1674,7 @@ abstract class DMLModStatementNode exten
 	)
 					throws StandardException
 	{
-        ArrayList conglomerates = new ArrayList();
+        ArrayList<ConglomerateDescriptor> conglomerates = new ArrayList<ConglomerateDescriptor>();
 
         DMLModStatementNode.getXAffectedIndexes(
                 td, updatedColumns, colBitSet, conglomerates);
@@ -1703,7 +1703,7 @@ abstract class DMLModStatementNode exten
 		TableDescriptor		baseTable,
 		ResultColumnList	updatedColumns,
         FormatableBitSet    colBitSet,
-        List                conglomerates
+        List<ConglomerateDescriptor>                conglomerates
 	)
 		throws StandardException
 	{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java?rev=1485333&r1=1485332&r2=1485333&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java Wed May 22 18:51:15 2013
@@ -148,7 +148,7 @@ public  class DefaultNode extends ValueN
 	 *
 	 * @exception StandardException		Thrown on failure
 	 */
-    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
+    ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates)
 		throws StandardException
 	{
 		ColumnDescriptor	cd;



Mime
View raw message