db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1484818 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/cache/ iapi/services/context/ iapi/services/info/ iapi/services/io/ iapi/services/loader/ iapi/sql/depend/ iapi/sql/dictionary/ iapi/store/access/ iapi/store/raw...
Date Tue, 21 May 2013 14:31:50 GMT
Author: rhillegas
Date: Tue May 21 14:31:49 2013
New Revision: 1484818

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

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.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/depend/ProviderList.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/cache/ClassSize.java Tue May 21 14:31:49 2013
@@ -29,6 +29,7 @@ import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Arrays;
 
+@SuppressWarnings("unchecked")
 public class ClassSize
 {
     public static final int refSize;
@@ -59,12 +60,12 @@ public class ClassSize
      * compile it. This may fail because ClassSizeCatalog.java is not created
      * until everything else has been compiled. Bury ClassSizeCatalog in a string.
      */
-    private static java.util.Hashtable catalog;
+    private static java.util.Hashtable<String,int[]> catalog;
     static
     {
         try
         {
-            catalog = (java.util.Hashtable)
+            catalog = (java.util.Hashtable<String,int[]>)
               Class.forName( "org.apache.derby.iapi.services.cache.ClassSizeCatalog").newInstance();
         }
         catch( Exception e){}
@@ -210,7 +211,7 @@ public class ClassSize
         return estimateBaseFromCatalog( cls, false);
     }
     
-    private static int estimateBaseFromCatalog( Class cls, boolean addToCatalog)
+    private static int estimateBaseFromCatalog( Class<?> cls, boolean addToCatalog)
     {
         if( dummyCatalog)
             return 0;
@@ -351,9 +352,9 @@ public class ClassSize
      */
     private static final String getSystemProperty(final String propName) {
         try {
-            return (String)AccessController.doPrivileged(
-                    new PrivilegedAction() {
-                        public Object run() {
+            return AccessController.doPrivileged(
+                    new PrivilegedAction<String>() {
+                        public String run() {
                             return System.getProperty(propName, null);
                         }
                 });

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java Tue May 21 14:31:49 2013
@@ -71,9 +71,9 @@ public class ContextManager
 	 */
 	private static final class CtxStack {
 		/** Internal list with all the elements of the stack. */
-		private final ArrayList stack_ = new ArrayList();
+		private final ArrayList<Context> stack_ = new ArrayList<Context>();
 		/** Read-only view of the internal list. */
-		private final List view_ = Collections.unmodifiableList(stack_);
+		private final List<Context> view_ = Collections.unmodifiableList(stack_);
 
 		// Keeping a reference to the top element on the stack
 		// optimizes the frequent accesses to this element. The
@@ -116,12 +116,12 @@ public class ContextManager
 	 * with a String key.
 	 * @see ContextManager#pushContext(Context)
 	 */
-	private final HashMap ctxTable = new HashMap();
+	private final HashMap<String,CtxStack> ctxTable = new HashMap<String,CtxStack>();
 
 	/**
 	 * List of all Contexts
 	 */
-	private final ArrayList holder = new ArrayList();
+	private final ArrayList<Context> holder = new ArrayList<Context>();
 
 	/**
 	 * Add a Context object to the ContextManager. The object is added
@@ -133,7 +133,7 @@ public class ContextManager
 	{
 		checkInterrupt();
 		final String contextId = newContext.getIdName();
-		CtxStack idStack = (CtxStack) ctxTable.get(contextId);
+		CtxStack idStack = ctxTable.get(contextId);
 
 		// if the stack is null, create a new one.
 		if (idStack == null) {
@@ -157,7 +157,7 @@ public class ContextManager
 	public Context getContext(String contextId) {
 		checkInterrupt();
 		
-		final CtxStack idStack = (CtxStack) ctxTable.get(contextId);
+		final CtxStack idStack = ctxTable.get(contextId);
 		if (SanityManager.DEBUG)
 			SanityManager.ASSERT( idStack == null ||
 								  idStack.isEmpty() ||
@@ -178,11 +178,11 @@ public class ContextManager
 		}
 
 		// remove the top context from the global stack
-		Context theContext = (Context) holder.remove(holder.size()-1);
+		Context theContext = holder.remove(holder.size()-1);
 
 		// now find its id and remove it from there, too
 		final String contextId = theContext.getIdName();
-		final CtxStack idStack = (CtxStack) ctxTable.get(contextId);
+		final CtxStack idStack = ctxTable.get(contextId);
 
 		if (SanityManager.DEBUG) {
 			SanityManager.ASSERT( idStack != null &&
@@ -207,7 +207,7 @@ public class ContextManager
 		holder.remove(holder.lastIndexOf(theContext));
 
 		final String contextId = theContext.getIdName();
-		final CtxStack idStack = (CtxStack) ctxTable.get(contextId);
+		final CtxStack idStack = ctxTable.get(contextId);
 
 		// now remove it from its id's stack.
 		idStack.remove(theContext);
@@ -234,7 +234,7 @@ public class ContextManager
 	 * @see org.apache.derby.iapi.sql.conn.StatementContext#resetSavePoint()
 	 */
 	public final List getContextStack(String contextId) {
-		final CtxStack cs = (CtxStack) ctxTable.get(contextId);
+		final CtxStack cs = ctxTable.get(contextId);
 		return (cs==null?Collections.EMPTY_LIST:cs.getUnmodifiableList());
 	}
     
@@ -337,7 +337,7 @@ cleanup:	for (int index = holder.size() 
 						break;
 					}
 
-					Context ctx = ((Context) holder.get(index));
+					Context ctx = (holder.get(index));
 					lastHandler = ctx.isLastHandler(errorSeverity);
 
 					ctx.cleanupOnError(error);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java Tue May 21 14:31:49 2013
@@ -157,7 +157,7 @@ public final class ContextService //OLD 
         cm3.activeCount = -1; // nesting in stack
         </pre>   
 	*/
-	private ThreadLocal threadContextList = new ThreadLocal();
+	private ThreadLocal<Object> threadContextList = new ThreadLocal<Object>();
 
     /**
      * Collection of all ContextManagers that are open
@@ -168,7 +168,7 @@ public final class ContextService //OLD 
      * @see #newContextManager()
      * @see SystemContext#cleanupOnError(Throwable)
      */
-	private HashSet allContexts;
+	private HashSet<ContextManager> allContexts;
 
     /**
      * Create a new ContextService for a Derby system.
@@ -182,7 +182,7 @@ public final class ContextService //OLD 
 
 		ContextService.factory = this;
 
-		allContexts = new HashSet();
+		allContexts = new HashSet<ContextManager>();
 
 	}
 
@@ -262,7 +262,7 @@ public final class ContextService //OLD 
 	 */
 	public ContextManager getCurrentContextManager() {
 
-		ThreadLocal tcl = threadContextList;
+		ThreadLocal<Object> tcl = threadContextList;
 		if (tcl == null) {
 			// The context service is already stopped.
 			return null;
@@ -294,7 +294,7 @@ public final class ContextService //OLD 
      * see that method for details.
      */
 	public void resetCurrentContextManager(ContextManager cm) {
-		ThreadLocal tcl = threadContextList;
+		ThreadLocal<Object> tcl = threadContextList;
 
 		if (tcl == null) {
 			// The context service is already stopped.
@@ -389,9 +389,10 @@ public final class ContextService //OLD 
      * @see ContextManager#activeCount
      * @see ContextManager#activeThread
     */
+    @SuppressWarnings("unchecked")
 	private boolean addToThreadList(Thread me, ContextManager associateCM) {
 
-		ThreadLocal tcl = threadContextList;
+		ThreadLocal<Object> tcl = threadContextList;
 
 		if (tcl == null) {
 			// The context service is already stopped.
@@ -411,7 +412,7 @@ public final class ContextService //OLD 
 			return true;
 		}
 
- 		java.util.Stack stack;
+ 		java.util.Stack<ContextManager> stack;
 		if (list instanceof ContextManager) {
             
             // Could be two situations:
@@ -431,7 +432,7 @@ public final class ContextService //OLD 
             
             // Nested, need to create a Stack of ContextManagers,
             // the top of the stack will be the active one.
-			stack = new java.util.Stack();
+			stack = new java.util.Stack<ContextManager>();
 			tcl.set(stack);
             
             // The stack represents the true nesting
@@ -448,7 +449,7 @@ public final class ContextService //OLD 
 		{
             // existing stack, nesting represented
             // by stack entries, not activeCount.
-			stack = (java.util.Stack) list;
+			stack = (java.util.Stack<ContextManager>) list;
 		}
 
 		stack.push(associateCM);
@@ -544,9 +545,9 @@ public final class ContextService //OLD 
 		Thread me = Thread.currentThread();
 
 		synchronized (this) {
-			for (Iterator i = allContexts.iterator(); i.hasNext(); ) {
+			for (Iterator<ContextManager> i = allContexts.iterator(); i.hasNext(); ) {
 
-				ContextManager cm = (ContextManager) i.next();
+				ContextManager cm = i.next();
 
 				Thread active = cm.activeThread;
 
@@ -560,7 +561,7 @@ public final class ContextService //OLD 
 				if (cm.setInterrupted(c))
                 {
                     AccessController.doPrivileged(
-                            new PrivilegedAction() {
+                            new PrivilegedAction<Object>() {
                                 public Object run()  {
                                     fActive.interrupt();
                                     return null;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/info/ProductVersionHolder.java Tue May 21 14:31:49 2013
@@ -109,7 +109,7 @@ import java.util.Properties;
   </PRE>
 
   */
-public final class ProductVersionHolder implements java.security.PrivilegedAction
+public final class ProductVersionHolder implements java.security.PrivilegedAction<Properties>
 {
 
 	//
@@ -523,7 +523,7 @@ public final class ProductVersionHolder 
 	** Security related methods 
 	*/
 	private String productGenus;
-	public final Object run() {
+	public final Properties run() {
 
 		// SECURITY PERMISSION - IP4
 		return loadProperties(this.productGenus);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FileUtil.java Tue May 21 14:31:49 2013
@@ -600,21 +600,21 @@ nextFile:	for (int i = 0; i < list.lengt
     private static Method setExec = null;
 
     // Reflection helper objects for calling into Java >= 7
-    private static Class fileClz = File.class;
-    private static Class filesClz;
-    private static Class pathClz;
-    private static Class pathsClz;
-    private static Class aclEntryClz;
-    private static Class aclFileAttributeViewClz;
-    private static Class posixFileAttributeViewClz;
-    private static Class userPrincipalClz;
-    private static Class linkOptionArrayClz;
-    private static Class linkOptionClz;
-    private static Class stringArrayClz;
-    private static Class aclEntryBuilderClz;
-    private static Class aclEntryTypeClz;
-    private static Class fileStoreClz;
-    private static Class aclEntryPermissionClz;
+    private static Class<File> fileClz = File.class;
+    private static Class<?> filesClz;
+    private static Class<?> pathClz;
+    private static Class<?> pathsClz;
+    private static Class<?> aclEntryClz;
+    private static Class<?> aclFileAttributeViewClz;
+    private static Class<?> posixFileAttributeViewClz;
+    private static Class<?> userPrincipalClz;
+    private static Class<?> linkOptionArrayClz;
+    private static Class<?> linkOptionClz;
+    private static Class<?> stringArrayClz;
+    private static Class<?> aclEntryBuilderClz;
+    private static Class<?> aclEntryTypeClz;
+    private static Class<?> fileStoreClz;
+    private static Class<?> aclEntryPermissionClz;
 
     private static Method get;
     private static Method getFileAttributeView;
@@ -948,7 +948,7 @@ nextFile:	for (int i = 0; i < list.lengt
             // aceb.setPermissions(new HashSet(Arrays.asList(perms);
             // newAcl.add(aceb);
 
-            List newAcl = new ArrayList();
+            List<Object> newAcl = new ArrayList<Object>();
             Object[] perms = (Object[]) values.invoke(null, (Object[]) null);
             Object aceb = newBuilder.invoke(null, (Object[]) null);
             Object allowValue = allow.get(aclEntryTypeClz);
@@ -956,7 +956,7 @@ nextFile:	for (int i = 0; i < list.lengt
             aceb = setType.invoke(aceb, new Object[]{allowValue});
             aceb = setPermissions.invoke(
                 aceb,
-                new Object[] {new HashSet(Arrays.asList(perms))});
+                new Object[] {new HashSet<Object>(Arrays.asList(perms))});
             newAcl.add(build.invoke(aceb, (Object[]) null));
 
             // view.setAcl(newAcl);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/io/FormatableHashtable.java Tue May 21 14:31:49 2013
@@ -34,7 +34,7 @@ import java.io.IOException;
  * A formatable holder for a java.util.Hashtable.
  * Used to avoid serializing Properties.
  */
-public class FormatableHashtable extends Hashtable implements Formatable
+public class FormatableHashtable extends Hashtable<Object,Object> implements Formatable
 {
 	/********************************************************
 	**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/loader/ClassInfo.java Tue May 21 14:31:49 2013
@@ -29,11 +29,11 @@ public class ClassInfo implements Instan
 	private static final Class[] noParameters = new Class[0];
 	private static final Object[] noArguments = new Object[0];
 
-	private final Class clazz;
+	private final Class<?> clazz;
 	private boolean useConstructor = true;
 	private Constructor noArgConstructor;
 
-	public ClassInfo(Class clazz) {
+	public ClassInfo(Class<?> clazz) {
 		this.clazz = clazz;
 	}
 

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=1484818&r1=1484817&r2=1484818&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 Tue May 21 14:31:49 2013
@@ -94,13 +94,13 @@ public class ClassInspector
 	{
 		try
 		{
-			Class toClass = getClass(toClassName);
+			Class<?> toClass = getClass(toClassName);
 			// is toClass an untyped null
 			if (toClass == null) {
 				return false;
 			}
 
-			Class fromClass = getClass(fromClassName);
+			Class<?> fromClass = getClass(fromClassName);
 
 			// is fromClass an untyped null
 			if (fromClass == null)
@@ -228,7 +228,7 @@ public class ClassInspector
          )
         throws ClassNotFoundException, StandardException
 	{
-		Class receiverClass = getClass(receiverType);
+		Class<?> receiverClass = getClass(receiverType);
 		if (receiverClass == null)
 			return null;
 
@@ -444,7 +444,7 @@ public class ClassInspector
 									boolean[] isParam)
 						throws ClassNotFoundException, StandardException 
 	{
-		Class receiverClass = getClass(receiverType);
+		Class<?> receiverClass = getClass(receiverType);
 		if (receiverClass == null)
 			return null;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/depend/ProviderList.java Tue May 21 14:31:49 2013
@@ -23,12 +23,14 @@ package org.apache.derby.iapi.sql.depend
 
 import java.util.Hashtable;
 
+import org.apache.derby.catalog.UUID;
+
 /**
  * ProviderList is a list of Providers that is being
  * tracked for some object other than the current dependent.
  */
 
-public class ProviderList extends Hashtable
+public class ProviderList extends Hashtable<UUID,Provider>
 {
 	/**
 	 * Add a Provider to the list.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/SPSDescriptor.java Tue May 21 14:31:49 2013
@@ -48,6 +48,7 @@ import org.apache.derby.iapi.sql.execute
 import org.apache.derby.iapi.store.access.TransactionController;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.DataTypeUtilities;
+import org.apache.derby.iapi.types.DataValueDescriptor;
 
 /**
  * A SPSDescriptor describes a Stored Prepared Statement.
@@ -589,7 +590,7 @@ public class SPSDescriptor extends Uniqu
 		throws StandardException
 	{
         if (params == null && !lookedUpParams) {
-            List tmpDefaults = new ArrayList();
+            List<DataValueDescriptor> tmpDefaults = new ArrayList<DataValueDescriptor>();
             params = getDataDictionary().getSPSParams(this, tmpDefaults);
             paramDefaults = tmpDefaults.toArray();
             lookedUpParams = true;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/BackingStoreHashtable.java Tue May 21 14:31:49 2013
@@ -107,7 +107,7 @@ public class BackingStoreHashtable
      **************************************************************************
      */
     private TransactionController tc;
-    private HashMap     hash_table;
+    private HashMap<Object,Object>     hash_table;
     private int[]       key_column_numbers;
     private boolean     remove_duplicates;
 	private boolean		skipNullKeyColumns;
@@ -217,8 +217,8 @@ public class BackingStoreHashtable
         {
             hash_table = 
                 ((loadFactor == -1) ? 
-                     new HashMap(initialCapacity) :
-                     new HashMap(initialCapacity, loadFactor));
+                     new HashMap<Object,Object>(initialCapacity) :
+                     new HashMap<Object,Object>(initialCapacity, loadFactor));
         }
         else
         {
@@ -249,9 +249,9 @@ public class BackingStoreHashtable
              */
             hash_table = 
                 (((estimated_rowcnt <= 0) || (row_source == null)) ?
-                     new HashMap() :
+                     new HashMap<Object,Object>() :
                      (estimated_rowcnt < max_inmemory_size) ?
-                         new HashMap((int) estimated_rowcnt) :
+                         new HashMap<Object,Object>((int) estimated_rowcnt) :
                          null);
         }
 
@@ -277,7 +277,7 @@ public class BackingStoreHashtable
                     // capacity of the hash table.
                     double rowUsage = getEstimatedMemUsage(row);
                     hash_table =
-                        new HashMap((int)(max_inmemory_size / rowUsage));
+                        new HashMap<Object,Object>((int)(max_inmemory_size / rowUsage));
                 }
                
                 add_row_to_hash_table(row, needsToClone);
@@ -292,7 +292,7 @@ public class BackingStoreHashtable
         // BackingStoreHashtable (ex. "size()") will have a working hash_table
         // on which to operate.
         if (hash_table == null)
-            hash_table = new HashMap();
+            hash_table = new HashMap<Object,Object>();
     }
 
     /**************************************************************************
@@ -394,6 +394,7 @@ public class BackingStoreHashtable
      *
 	 * @exception  StandardException  Standard exception policy.
      **/
+    @SuppressWarnings("unchecked")
     private void add_row_to_hash_table(DataValueDescriptor[] row, boolean needsToClone)
 		throws StandardException
     {
@@ -413,18 +414,18 @@ public class BackingStoreHashtable
         {
             if (!remove_duplicates)
             {
-                List row_vec;
+                List<Object> row_vec;
 
                 // inserted a duplicate
                 if (duplicate_value instanceof List)
                 {
                     doSpaceAccounting( row, false);
-                    row_vec = (List) duplicate_value;
+                    row_vec = (List<Object>) duplicate_value;
                 }
                 else
                 {
                     // allocate list to hold duplicates
-                    row_vec = new ArrayList(2);
+                    row_vec = new ArrayList<Object>(2);
 
                     // insert original row into vector
                     row_vec.add(duplicate_value);
@@ -572,7 +573,7 @@ public class BackingStoreHashtable
      *
 	 * @exception  StandardException  Standard exception policy.
      **/
-    public Enumeration elements()
+    public Enumeration<Object> elements()
         throws StandardException
     {
         if( diskHashtable == null)
@@ -746,10 +747,10 @@ public class BackingStoreHashtable
         return hash_table.size() + diskHashtable.size();
     }
 
-    private class BackingStoreHashtableEnumeration implements Enumeration
+    private class BackingStoreHashtableEnumeration implements Enumeration<Object>
     {
-        private Iterator memoryIterator;
-        private Enumeration diskEnumeration;
+        private Iterator<Object> memoryIterator;
+        private Enumeration<Object> diskEnumeration;
 
         BackingStoreHashtableEnumeration()
         {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/DiskHashtable.java Tue May 21 14:31:49 2013
@@ -251,6 +251,7 @@ public class DiskHashtable 
         return getRemove(key, false, false);
     }
 
+    @SuppressWarnings("unchecked")
     private Object getRemove(Object key, boolean remove, boolean existenceOnly)
         throws StandardException
     {
@@ -296,19 +297,19 @@ public class DiskHashtable 
                         // if there is more than one row, return a vector of
                         // the rows.
                         //
-                        Vector v;
+                        Vector<Object> v;
                         if( rowCount == 2)
                         {
                             // convert the "single" row retrieved from the
                             // first trip in the loop, to a vector with the
                             // first two rows.
-                            v = new Vector( 2);
+                            v = new Vector<Object>( 2);
                             v.add( retValue);
                             retValue = v;
                         }
                         else
                         {
-                            v = (Vector) retValue;
+                            v = (Vector<Object>) retValue;
                         }
                         v.add( BackingStoreHashtable.shallowCloneRow( row));
                     }
@@ -380,13 +381,13 @@ public class DiskHashtable 
      *
 	 * @exception  StandardException  Standard exception policy.
      **/
-    public Enumeration elements()
+    public Enumeration<Object> elements()
         throws StandardException
     {
         return new ElementEnum();
     }
 
-    private class ElementEnum implements Enumeration
+    private class ElementEnum implements Enumeration<Object>
     {
         private ScanController scan;
         private boolean hasMore;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/store/raw/ContainerKey.java Tue May 21 14:31:49 2013
@@ -165,7 +165,7 @@ public final class ContainerKey implemen
 	/**
 		This lockable wants to participate in the Virtual Lock table.
 	 */
-	public boolean lockAttributes(int flag, Hashtable attributes)
+	public boolean lockAttributes(int flag, Hashtable<String,Object> attributes)
 	{
 		if (SanityManager.DEBUG)
 		{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/NumberDataType.java Tue May 21 14:31:49 2013
@@ -418,12 +418,13 @@ public abstract class NumberDataType ext
 		setValue for integral exact numerics. Converts the BigDecimal
 		to a long to preserve precision
 	*/
+    @SuppressWarnings("unchecked")
 	public void setBigDecimal(Number bigDecimal) throws StandardException
 	{
 		if (objectNull(bigDecimal))
 			return;
 
-		Comparable bdc = (Comparable) bigDecimal;
+		Comparable  bdc = (Comparable) bigDecimal;
 
 
 		// See comment in SQLDecimal.getLong()

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/UserType.java Tue May 21 14:31:49 2013
@@ -349,6 +349,7 @@ public class UserType extends DataType
 	 *
 	 * @exception StandardException thrown on failure
 	 */
+    @SuppressWarnings("unchecked")
 	public int compare(DataValueDescriptor other)
 		throws StandardException
 	{
@@ -388,7 +389,7 @@ public class UserType extends DataType
 
 		try
 		{
-			comparison = ((java.lang.Comparable) value).compareTo(other.getObject());
+			comparison = ((java.lang.Comparable<Object>) value).compareTo(other.getObject());
 		}
 		catch (ClassCastException cce)
 		{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/XML.java Tue May 21 14:31:49 2013
@@ -1033,14 +1033,14 @@ public class XML
      */
     private static Object checkJAXPRequirement() {
         try {
-            Class factoryClass =
+            Class<?> factoryClass =
                     Class.forName("javax.xml.parsers.DocumentBuilderFactory");
             Method newFactory = factoryClass.getMethod(
                     "newInstance", new Class[0]);
             Method newBuilder = factoryClass.getMethod(
                     "newDocumentBuilder", new Class[0]);
 
-            Class builderClass =
+            Class<?> builderClass =
                     Class.forName("javax.xml.parsers.DocumentBuilder");
             Method getImpl = builderClass.getMethod(
                     "getDOMImplementation", new Class[0]);
@@ -1068,7 +1068,7 @@ public class XML
      */
     private static boolean checkXPathRequirement(Object domImpl) {
         try {
-            Class domImplClass = Class.forName("org.w3c.dom.DOMImplementation");
+            Class<?> domImplClass = Class.forName("org.w3c.dom.DOMImplementation");
             Method getFeature = domImplClass.getMethod(
                     "getFeature", new Class[] {String.class, String.class});
             Object impl =

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/build.xml Tue May 21 14:31:49 2013
@@ -57,6 +57,7 @@
         <pathelement path="${xmlApis};${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/iapi/types/SqlXmlUtil.java"/>
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
 
     <javac

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/IdUtil.java Tue May 21 14:31:49 2013
@@ -125,7 +125,7 @@ public abstract class IdUtil
 	private static String[] parseMultiPartSQLIdentifier(StringReader r)
 		 throws StandardException
 	{
-		Vector v = new Vector();
+		Vector<String> v = new Vector<String>();
 		while (true)
 		{
 			String thisId = parseId(r,true);
@@ -411,7 +411,7 @@ public abstract class IdUtil
 		if (input.length() == 0)
 			return new String[0][];
 
-		Vector v = new Vector();
+		Vector<String[]> v = new Vector<String[]>();
 		java.io.StringReader r = new java.io.StringReader(input);
 		//
 		while (true)
@@ -486,7 +486,7 @@ public abstract class IdUtil
 	private static String[] parseIdList(StringReader r, boolean normalize)
 		 throws StandardException
 	{
-		Vector v = new Vector();
+		Vector<String> v = new Vector<String>();
 		while (true)
 		{
 			int delim;
@@ -529,9 +529,9 @@ public abstract class IdUtil
 	public static String intersect(String[] l1, String[] l2)
 	{
 		if (l1 == null || l2 == null) return null;
-		HashSet h = new HashSet();
+		HashSet<String> h = new HashSet<String>();
 		for(int ix=0;ix<l2.length;ix++) h.add(l2[ix]); 
-		Vector v = new Vector();
+		Vector<String> v = new Vector<String>();
 		for(int ix=0;ix<l1.length;ix++) if (h.contains(l1[ix])) v.add(l1[ix]);
 		return vectorToIdList(v,true); 
 	}
@@ -543,7 +543,7 @@ public abstract class IdUtil
 	  @param normal True means the ids in v are in normal form
 	         and false means they are in external form.
 	  */
-	private static String vectorToIdList(Vector v,boolean normal)
+	private static String vectorToIdList(Vector<String> v,boolean normal)
 	{
 		if (v.size() == 0) return null;
 		String[] a = new String[v.size()];
@@ -596,8 +596,8 @@ public abstract class IdUtil
 	public static String dups(String[] l)
 	{
 		if (l == null) return null;
-		HashSet h = new HashSet();
-		Vector v = new Vector();
+		HashSet<String> h = new HashSet<String>();
+		Vector<String> v = new Vector<String>();
 		for(int ix=0;ix<l.length;ix++)
 		{
 			if (!h.contains(l[ix]))
@@ -619,8 +619,8 @@ public abstract class IdUtil
 		String[] normal_a = parseIdList(l);
 		StringReader r = new StringReader(l);
 		String[] external_a = parseIdList(r,false);
-		HashSet h = new HashSet();
-		Vector v = new Vector();
+		HashSet<String> h = new HashSet<String>();
+		Vector<String> v = new Vector<String>();
 		for(int ix=0;ix<normal_a.length;ix++)
 		{
 			if (!h.contains(normal_a[ix]))
@@ -698,7 +698,7 @@ public abstract class IdUtil
 		 throws StandardException
 	{
 		if (list==null) return null;
-		Vector v = new Vector();
+		Vector<String> v = new Vector<String>();
 		StringReader r = new StringReader(list);
 		String[] enteredList_a = parseIdList(r,false);
         

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/util/InterruptStatus.java Tue May 21 14:31:49 2013
@@ -67,7 +67,7 @@ public class InterruptStatus {
      * Use thread local variable to store interrupt status flag *only* if we
      * don't have lcc, e.g. during database creation, shutdown etc.
      */
-    private static final ThreadLocal exception = new ThreadLocal ();
+    private static final ThreadLocal<Exception> exception = new ThreadLocal<Exception>();
 
     /**
      * Make a note that this thread saw an interrupt. Thread's intr

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/BaseMonitor.java Tue May 21 14:31:49 2013
@@ -102,7 +102,7 @@ abstract class BaseMonitor
 	/**
 		Hash table of objects that implement PersistentService keyed by their getType() method.
 	*/
-	private HashMap serviceProviders = new HashMap();
+	private HashMap<String,PersistentService> serviceProviders = new HashMap<String,PersistentService>();
 	private static final String LINE = 
         "----------------------------------------------------------------";
 
@@ -111,7 +111,7 @@ abstract class BaseMonitor
 
 	Vector[]     implementationSets;
 
-	private Vector	  services;					// Vector of TopServices
+	private Vector<TopService>	  services;					// Vector of TopServices
 
 	Properties bootProperties;		// specifc properties provided by the boot method, override everything else
 	Properties applicationProperties;
@@ -140,7 +140,7 @@ abstract class BaseMonitor
 	BaseMonitor() {
 		super();
 
-		services = new Vector(0, 1);
+		services = new Vector<TopService>(0, 1);
 		services.add(new TopService(this));	// first element is always the free-floating service
 	}
 
@@ -182,7 +182,7 @@ abstract class BaseMonitor
 				if (position == 0)
 					break;
 
-				ts = (TopService) services.get(position);
+				ts = services.get(position);
 			}
 
 			// push a new context manager
@@ -203,7 +203,7 @@ abstract class BaseMonitor
 		}
 		
 		Monitor.getStream().println(LINE);
-		((TopService) services.get(0)).shutdown();
+		(services.get(0)).shutdown();
 
 		ContextService.stop();
 		Monitor.clearMonitor();
@@ -279,10 +279,10 @@ abstract class BaseMonitor
 			}
 		}
 
-		Vector bootImplementations = getImplementations(bootProperties, false);
+		Vector<Class<?>> bootImplementations = getImplementations(bootProperties, false);
 
-		Vector systemImplementations = null;
-		Vector applicationImplementations = null;
+		Vector<Class<?>> systemImplementations = null;
+		Vector<Class<?>> applicationImplementations = null;
 
 		// TEMP - making this sanity only breaks the unit test code
 		// I will fix soon, djd.
@@ -417,7 +417,7 @@ abstract class BaseMonitor
 		TopService myts = null;
 		synchronized (this) {
 			for (int i = 1; i < services.size(); i++) {
-				TopService ts = (TopService) services.get(i);
+				TopService ts = services.get(i);
 				if (ts.isPotentialService(key)) {
 					myts = ts;
 					break;
@@ -548,10 +548,10 @@ abstract class BaseMonitor
 	private synchronized TopService findTopService(Object serviceModule) {
 
 		if (serviceModule == null)
-			return (TopService) services.get(0);
+			return services.get(0);
 
 		for (int i = 1; i < services.size(); i++) {
-			TopService ts = (TopService) services.get(i);
+			TopService ts = services.get(i);
 			if (ts.inService(serviceModule))
 				return ts;
 		}
@@ -708,18 +708,18 @@ abstract class BaseMonitor
 
 		The module's start or create method is not called.
 	*/
-
-	protected Object loadInstance(Class factoryInterface, Properties properties) {
+    @SuppressWarnings("unchecked")
+	protected Object loadInstance(Class<?> factoryInterface, Properties properties) {
 
 		Object instance = null;
 
-		Vector localImplementations = getImplementations(properties, false);
+		Vector<Class<?>> localImplementations = getImplementations(properties, false);
 		if (localImplementations != null) {
 			instance = loadInstance(localImplementations, factoryInterface, properties);
 		}
 
 		for (int i = 0; i < implementationSets.length; i++) {
-			instance = loadInstance(implementationSets[i], factoryInterface, properties);
+			instance = loadInstance( (Vector<Class<?>>) implementationSets[i], factoryInterface, properties);
 			if (instance != null)
 				break;
 		}
@@ -728,7 +728,7 @@ abstract class BaseMonitor
 	}
 
 
-	private Object loadInstance(Vector implementations, Class factoryInterface, Properties properties) {
+	private Object loadInstance(Vector<Class<?>> implementations, Class<?> factoryInterface, Properties properties) {
 
 		for (int index = 0; true; index++) {
 
@@ -751,12 +751,12 @@ abstract class BaseMonitor
 		into the implementations vecotr of that class. Returns -1 if no class
 		could be found.
 	*/
-	private static int findImplementation(Vector implementations, int startIndex, Class factoryInterface) {
+	private static int findImplementation(Vector<Class<?>> implementations, int startIndex, Class<?> factoryInterface) {
 
 		for (int i = startIndex; i < implementations.size(); i++) {
 
 			//try {
-				Class factoryClass = (Class) implementations.get(i);
+				Class<?> factoryClass = implementations.get(i);
 				if (!factoryInterface.isAssignableFrom(factoryClass)) {
 					continue;
 				}
@@ -840,7 +840,7 @@ abstract class BaseMonitor
 
 			// count the number of services that implement the required protocol
 			for (int i = 1; i < services.size(); i++) {
-				ts = (TopService) services.get(i);
+				ts = services.get(i);
 				if (ts.isActiveService()) {
 					if (ts.getKey().getFactoryInterface().getName().equals(protocol))
 						count++;
@@ -852,7 +852,7 @@ abstract class BaseMonitor
 			if (count != 0) {
 				int j = 0;
 				for (int i = 1; i < services.size(); i++) {
-					ts = (TopService) services.get(i);
+					ts = services.get(i);
 					if (ts.isActiveService()) {
 						if (ts.getKey().getFactoryInterface().getName().equals(protocol)) {
 							list[j++] = ts.getServiceType().getUserServiceName(ts.getKey().getIdentifier());
@@ -1047,12 +1047,12 @@ abstract class BaseMonitor
 		If no implementations are listed in the properties object
 		then null is returned.
 	*/
-	private Vector getImplementations(Properties moduleList, boolean actualModuleList) {
+	private Vector<Class<?>> getImplementations(Properties moduleList, boolean actualModuleList) {
 
 		if (moduleList == null)
 			return null;
 
-		Vector implementations = actualModuleList ? new Vector(moduleList.size()) : new Vector(0,1);
+		Vector<Class<?>> implementations = actualModuleList ? new Vector<Class<?>>(moduleList.size()) : new Vector<Class<?>>(0,1);
 
 		// Get my current JDK environment
 		int theJDKId = JVMInfo.JDK_ID;
@@ -1126,7 +1126,7 @@ nextModule:
 			}
 
 			try {
-				Class possibleModule = Class.forName(className);
+				Class<?> possibleModule = Class.forName(className);
 
 				// Look for the monitors special modules, PersistentService ones.
 				if (getPersistentServiceImplementation(possibleModule))
@@ -1218,7 +1218,7 @@ nextModule:
 		return implementations;
 	}
 
-    private boolean getPersistentServiceImplementation( Class possibleModule)
+    private boolean getPersistentServiceImplementation( Class<?> possibleModule)
     {
         if( ! PersistentService.class.isAssignableFrom(possibleModule))
             return false;
@@ -1232,7 +1232,7 @@ nextModule:
         return true;
     } // end of getPersistentServiceImplementation
         
-	private Vector getDefaultImplementations() {
+	private Vector<Class<?>> getDefaultImplementations() {
 
 		Properties moduleList = getDefaultModuleProperties();
 
@@ -1408,9 +1408,9 @@ nextModule:
 	*/
 	private void determineSupportedServiceProviders() {
 
-		for (Iterator i = serviceProviders.values().iterator(); i.hasNext(); ) {
+		for (Iterator<PersistentService> i = serviceProviders.values().iterator(); i.hasNext(); ) {
 
-			Object provider = i.next();
+			PersistentService provider = i.next();
 
 			// see if this provider can live in this environment
 			if (!BaseMonitor.canSupport(provider, (Properties) null)) {
@@ -1651,10 +1651,10 @@ nextModule:
         String className = PropertyUtil.getSystemProperty( propertyName);
         if( className != null)
             return className;
-        return (String) storageFactories.get( subSubProtocol);
+        return storageFactories.get( subSubProtocol);
     } // end of getStorageFactoryClassName
 
-    private static final HashMap storageFactories = new HashMap();
+    private static final HashMap<String,String> storageFactories = new HashMap<String,String>();
     static {
 		String dirStorageFactoryClass;
         if (!JVMInfo.J2ME)
@@ -1724,7 +1724,7 @@ nextModule:
 				}
 
 				for (int i = 1; i < services.size(); i++) {
-					TopService ts2 = (TopService) services.get(i);
+					TopService ts2 = services.get(i);
 					if (ts2.isPotentialService(serviceKey)) {
 						// if the service already exists then  just return null
 						return null;
@@ -2101,9 +2101,9 @@ nextModule:
 	*/
 	abstract boolean initialize(boolean lite);
 
-    class ProviderEnumeration implements Enumeration
+    class ProviderEnumeration implements Enumeration<PersistentService>
     {
-        private Enumeration serviceProvidersKeys = (serviceProviders == null) ? null :
+        private Enumeration<String> serviceProvidersKeys = (serviceProviders == null) ? null :
             Collections.enumeration(serviceProviders.keySet());
         private Properties startParams;
         private Enumeration paramEnumeration;
@@ -2117,12 +2117,12 @@ nextModule:
                 paramEnumeration = startParams.keys();
         }
 
-        public Object nextElement() throws NoSuchElementException
+        public PersistentService nextElement() throws NoSuchElementException
         {
             if( serviceProvidersKeys != null && serviceProvidersKeys.hasMoreElements())
                 return serviceProviders.get( serviceProvidersKeys.nextElement());
             getNextStorageFactory();
-            Object ret = storageFactoryPersistentService;
+            PersistentService ret = storageFactoryPersistentService;
             storageFactoryPersistentService = null;
             return ret;
         }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/FileMonitor.java Tue May 21 14:31:49 2013
@@ -194,8 +194,8 @@ public final class FileMonitor extends B
 	final boolean initialize(final boolean lite)
 	{
         // SECURITY PERMISSION - OP2, OP2a, OP2b
-        return ((Boolean) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        return (AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+            public Boolean run() {
                 return Boolean.valueOf(PBinitialize(lite));
             }
         })).booleanValue();
@@ -203,9 +203,9 @@ public final class FileMonitor extends B
 
 	final Properties getDefaultModuleProperties() {
         // SECURITY PERMISSION - IP1
-        return (Properties) AccessController.doPrivileged(
-                new PrivilegedAction() {
-            public Object run() {
+        return AccessController.doPrivileged(
+                new PrivilegedAction<Properties>() {
+            public Properties run() {
                 return FileMonitor.super.getDefaultModuleProperties();
             }
         });
@@ -216,8 +216,8 @@ public final class FileMonitor extends B
 			return PBgetJVMProperty(key);
 
         // SECURITY PERMISSION - OP1
-        return (String) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        return AccessController.doPrivileged(new PrivilegedAction<String>() {
+            public String run() {
                 return PBgetJVMProperty(key);
             }
         });
@@ -227,8 +227,8 @@ public final class FileMonitor extends B
             final Runnable task,
             final String name,
             final boolean setMinPriority) {
-        return (Thread) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        return AccessController.doPrivileged(new PrivilegedAction<Thread>() {
+            public Thread run() {
                 try {
                     return FileMonitor.super.getDaemonThread(
                             task, name, setMinPriority);
@@ -250,7 +250,7 @@ public final class FileMonitor extends B
     }
 
 	public final void setThreadPriority(final int priority) {
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
                 FileMonitor.super.setThreadPriority(priority);
                 return null;
@@ -262,9 +262,9 @@ public final class FileMonitor extends B
 	  throws IOException {
 		try {
 			// SECURITY PERMISSION - OP3
-			return (InputStream) AccessController.doPrivileged(
-                    new PrivilegedExceptionAction() {
-                public Object run() throws IOException {
+			return AccessController.doPrivileged(
+                    new PrivilegedExceptionAction<InputStream>() {
+                public InputStream run() throws IOException {
                     return PBapplicationPropertiesStream();
                 }
             });

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/ProtocolKey.java Tue May 21 14:31:49 2013
@@ -39,7 +39,7 @@ class ProtocolKey {
 	/**
 		The class of the factory
 	*/
-	protected Class factoryInterface;
+	protected Class<?> factoryInterface;
 
 	/**
 		name of module, can be null
@@ -50,7 +50,7 @@ class ProtocolKey {
 	** Constructor
 	*/
 
-	protected ProtocolKey(Class factoryInterface, String identifier)
+	protected ProtocolKey(Class<?> factoryInterface, String identifier)
 	{
 		super();
 		this.factoryInterface = factoryInterface;
@@ -78,7 +78,7 @@ class ProtocolKey {
 	** Methods required to use this key
 	*/
 
-	protected Class getFactoryInterface() {
+	protected Class<?> getFactoryInterface() {
 		return factoryInterface;
 	}
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java Tue May 21 14:31:49 2013
@@ -94,7 +94,7 @@ final class StorageFactoryService implem
             try
             {
                 AccessController.doPrivileged(
-                    new java.security.PrivilegedExceptionAction()
+                    new java.security.PrivilegedExceptionAction<Object>()
                     {
                         public Object run() throws IOException, StandardException
                         {
@@ -130,7 +130,7 @@ final class StorageFactoryService implem
             catch( IOException ioe){ throw Monitor.exceptionStartingModule(/*serviceName, */ ioe); }
         }
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction()
+            new java.security.PrivilegedAction<Object>()
             {
                 public Object run()
                 {
@@ -181,10 +181,10 @@ final class StorageFactoryService implem
     {
         try
         {
-            return (StorageFactory) AccessController.doPrivileged(
-                new PrivilegedExceptionAction()
+            return AccessController.doPrivileged(
+                new PrivilegedExceptionAction<StorageFactory>()
                 {
-                    public Object run() throws InstantiationException, IllegalAccessException, IOException
+                    public StorageFactory run() throws InstantiationException, IllegalAccessException, IOException
                     {
                         return privGetStorageFactoryInstance( useHome, databaseName, tempDirName, uniqueName);
                     }
@@ -265,7 +265,7 @@ final class StorageFactoryService implem
 		try
         {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction()
+                new PrivilegedExceptionAction<Object>()
                 {
                     public Object run()
                         throws IOException, StandardException,
@@ -337,7 +337,7 @@ final class StorageFactoryService implem
         try
         {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction()
+                new PrivilegedExceptionAction<Object>()
                 {
                     public Object run() throws StandardException
                     {
@@ -434,7 +434,7 @@ final class StorageFactoryService implem
         try
         {
             AccessController.doPrivileged(
-            	    new PrivilegedExceptionAction()
+            	    new PrivilegedExceptionAction<Object>()
                     {
                         public Object run() throws StandardException
                         {
@@ -488,7 +488,7 @@ final class StorageFactoryService implem
         try
         {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction()
+                new PrivilegedExceptionAction<Object>()
                 {
                     public Object run() throws StandardException
                     {
@@ -679,7 +679,7 @@ final class StorageFactoryService implem
                     try
                     {
                         if( AccessController.doPrivileged(
-                                new PrivilegedExceptionAction()
+                                new PrivilegedExceptionAction<Object>()
                                 {
                                     public Object run()
                                         throws IOException, StandardException, InstantiationException, IllegalAccessException
@@ -726,7 +726,7 @@ final class StorageFactoryService implem
                     try
                     {
                         AccessController.doPrivileged(
-                            new PrivilegedExceptionAction()
+                            new PrivilegedExceptionAction<Object>()
                             {
                                 public Object run()
                                     throws IOException, StandardException, InstantiationException, IllegalAccessException
@@ -783,7 +783,7 @@ final class StorageFactoryService implem
         try
         {
             return getProtocolLeadIn() + (String) AccessController.doPrivileged(
-                new PrivilegedExceptionAction()
+                new PrivilegedExceptionAction<Object>()
                 {
                     public Object run()
                         throws StandardException, IOException, InstantiationException, IllegalAccessException
@@ -888,7 +888,7 @@ final class StorageFactoryService implem
         try
         {
             return AccessController.doPrivileged(
-                new PrivilegedExceptionAction()
+                new PrivilegedExceptionAction<Object>()
                 {
                     public Object run()
                         throws StandardException, IOException, InstantiationException, IllegalAccessException
@@ -949,10 +949,10 @@ final class StorageFactoryService implem
 
         try
         {
-            return getProtocolLeadIn() + (String) AccessController.doPrivileged(
-                new PrivilegedExceptionAction()
+            return getProtocolLeadIn() + AccessController.doPrivileged(
+                new PrivilegedExceptionAction<String>()
                 {
-                    public Object run()
+                    public String run()
                         throws StandardException, IOException, InstantiationException, IllegalAccessException
                     {
                         StorageFactory storageFactory = privGetStorageFactoryInstance( true, nm, null, null);
@@ -1010,9 +1010,9 @@ final class StorageFactoryService implem
      * @throws SecurityException if the required privileges are missing
      */
     private final boolean fileExists(final File file) {
-        return ((Boolean)AccessController.doPrivileged(
-                new PrivilegedAction() {
-                    public Object run() {
+        return (AccessController.doPrivileged(
+                new PrivilegedAction<Boolean>() {
+                    public Boolean run() {
                         return new Boolean(file.exists());
                     }
             })).booleanValue();
@@ -1046,7 +1046,7 @@ final class StorageFactoryService implem
         }
     }
     
-    final class DirectoryList implements Enumeration, PrivilegedAction
+    final class DirectoryList implements Enumeration, PrivilegedAction<DirectoryList>
     {
         private String[] contents;
         private StorageFile systemDirectory;	 
@@ -1086,7 +1086,7 @@ final class StorageFactoryService implem
         } // end of nextElement
 
         // PrivilegedAction method
-        public final Object run()
+        public final DirectoryList run()
         {
             switch( actionCode)
             {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/monitor/TopService.java Tue May 21 14:31:49 2013
@@ -61,11 +61,11 @@ final class TopService {
 	/**
 		List of protocols.
 	*/
-	Hashtable		protocolTable;
+	Hashtable<ProtocolKey,ModuleInstance>		protocolTable;
 
 	/**
 	*/
-	Vector		moduleInstances;
+	Vector<ModuleInstance>		moduleInstances;
 
 	/**
 	*/
@@ -88,8 +88,8 @@ final class TopService {
 	TopService(BaseMonitor monitor) {
 		super();
 		this.monitor = monitor;
-		protocolTable = new Hashtable();
-		moduleInstances = new Vector(0, 5);
+		protocolTable = new Hashtable<ProtocolKey,ModuleInstance>();
+		moduleInstances = new Vector<ModuleInstance>(0, 5);
 	}
 
 	TopService(BaseMonitor monitor, ProtocolKey key, PersistentService serviceType, Locale serviceLocale)
@@ -208,7 +208,7 @@ final class TopService {
 	*/
 	synchronized Object findModule(ProtocolKey key, boolean findOnly, Properties properties) {
 
-		ModuleInstance module = (ModuleInstance) protocolTable.get(key);
+		ModuleInstance module = protocolTable.get(key);
 
 		if (module == null)
 			return null;
@@ -235,7 +235,7 @@ final class TopService {
         // ArrayIndexOutOfBoundsException.
         synchronized (moduleInstances) {
             for (int i = 0; i < moduleInstances.size(); i++) {
-                ModuleInstance module = (ModuleInstance) moduleInstances.get(i);
+                ModuleInstance module = moduleInstances.get(i);
                 if (module.getInstance() == instance) {
                     return module;
                 }
@@ -281,7 +281,7 @@ final class TopService {
                 // and result in an ArrayIndexOutOfBoundsException.
                 synchronized (moduleInstances) {
                     if (i < moduleInstances.size()) {
-                        module = (ModuleInstance) moduleInstances.get(i);
+                        module = moduleInstances.get(i);
                     } else {
                         // No more instances to look at, break out of the loop.
                         break;
@@ -386,7 +386,7 @@ final class TopService {
 				if (moduleInstances.isEmpty())
 					return true;
 
-				module = (ModuleInstance) moduleInstances.get(0);
+				module = moduleInstances.get(0);
 
 			}
 			

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java?rev=1484818&r1=1484817&r2=1484818&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/access/PropertyConglomerate.java Tue May 21 14:31:49 2013
@@ -366,7 +366,7 @@ class PropertyConglomerate
 	{
 		if (saveServiceProperty(key,value)) return;
 
-		Dictionary<String,Object> defaults = (Dictionary<String,Object>)
+		Hashtable<Object,Object> defaults = (Hashtable<Object,Object>)
             readProperty(tc,AccessFactoryGlobals.DEFAULT_PROPERTY_NAME);
 		if (defaults == null) defaults = new FormatableHashtable();
 		if (value==null)



Mime
View raw message