db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1482578 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/services: ./ bytecode/ cache/ daemon/ jce/ locks/ reflect/ stream/ timer/
Date Tue, 14 May 2013 20:46:59 GMT
Author: rhillegas
Date: Tue May 14 20:46:59 2013
New Revision: 1482578

URL: http://svn.apache.org/r1482578
Log:
DERBY-6213: Generify impl/services packages.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCClass.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/GClass.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/d_BCValidate.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/cache/Clock.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/SingleThreadDaemonFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Control.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Deadlock.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockControl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSpace.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/TableNameInfo.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Timeout.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectClassesJava2.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectGeneratedClass.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/stream/SingleStream.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/build.xml?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/build.xml Tue May 14 20:46:59 2013
@@ -52,7 +52,7 @@
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/impl/services/**"/>
-      <!-- <compilerarg value="-Xlint:unchecked"/> -->
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
  </target> 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCClass.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCClass.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCClass.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCClass.java Tue May 14 20:46:59 2013
@@ -137,10 +137,10 @@ class BCClass extends GClass {
 		if (SanityManager.DEBUG) {
 			if (SanityManager.DEBUG_ON("DumpClassFile")) {
 				/* Dump the file in derby.system.home */
-				String systemHome = (String )AccessController.doPrivileged
-				(new java.security.PrivilegedAction(){
+				String systemHome = AccessController.doPrivileged
+				(new java.security.PrivilegedAction<String>(){
 
-					public Object run(){
+					public String run(){
 						return System.getProperty(Property.SYSTEM_HOME_PROPERTY,".");
 
 					}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/BCMethod.java Tue May 14 20:46:59 2013
@@ -98,7 +98,7 @@ class BCMethod implements MethodBuilder 
     private final String[] parameterTypes;
     
     
-	Vector thrownExceptions; // expected to be names of Classes under Throwable
+	Vector<String> thrownExceptions; // expected to be names of Classes under Throwable
 
 	CodeChunk myCode;
 	protected ClassMember myEntry;
@@ -210,7 +210,7 @@ class BCMethod implements MethodBuilder 
 		}
 
 		if (thrownExceptions == null)
-			thrownExceptions = new Vector();
+			thrownExceptions = new Vector<String>();
 		thrownExceptions.add(exceptionClass);
 	}
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/GClass.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/GClass.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/GClass.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/GClass.java Tue May 14 20:46:59 2013
@@ -81,9 +81,9 @@ public abstract class GClass implements 
 		FileOutputStream fos = null;
 		try {
 			try {
-				fos =  (FileOutputStream)AccessController.doPrivileged(
-						new PrivilegedExceptionAction() {
-							public Object run()
+				fos =  AccessController.doPrivileged(
+						new PrivilegedExceptionAction<FileOutputStream>() {
+							public FileOutputStream run()
 							throws FileNotFoundException {
 								return new FileOutputStream(classFile);
 							}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/d_BCValidate.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/d_BCValidate.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/d_BCValidate.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/bytecode/d_BCValidate.java Tue May 14 20:46:59 2013
@@ -75,7 +75,7 @@ class d_BCValidate
 
 				Class[] params = NO_PARAMS;
 
-				Class declaring = loadClass(declaringClass);
+				Class<?> declaring = loadClass(declaringClass);
 
 				if (debugParameterTypes != null) {
 					params = new Class[debugParameterTypes.length];
@@ -105,7 +105,7 @@ class d_BCValidate
 				String actualReturnType;
 
 				if (methodName.equals("<init>")) {
-					Constructor c;
+					Constructor<?> c;
 					
 					if (sameClassLoader)
 					{
@@ -192,11 +192,11 @@ class d_BCValidate
 		}
 	}
 
-	private static Hashtable primitives;
+	private static Hashtable<String,Class<?>> primitives;
 
 	static {
 		if (SanityManager.DEBUG) {
-			primitives = new Hashtable();
+			primitives = new Hashtable<String,Class<?>>();
 			primitives.put("boolean", Boolean.TYPE);
 			primitives.put("byte", Byte.TYPE);
 			primitives.put("char", Character.TYPE);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/cache/Clock.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/cache/Clock.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/cache/Clock.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/cache/Clock.java Tue May 14 20:46:59 2013
@@ -105,10 +105,10 @@ final class Clock implements CacheManage
 	** Fields
 	*/
 	private final CacheStat stat;
-	private final HashMap cache_;
+	private final HashMap<Object,CachedItem> cache_;
 	private DaemonService		cleaner;	// the background worker thread who is going to
 									// do pre-flush for this cache. 
-	private final ArrayList		holders;
+	private final ArrayList<CachedItem>		holders;
     private int validItemCount = 0;
 	private long			maximumSize;
     private boolean useByteCount; // regulate the total byte count or the entry count
@@ -150,7 +150,7 @@ final class Clock implements CacheManage
 	*/
 	Clock(CacheableFactory holderFactory, String name,
 		  int initialSize, long maximumSize, boolean useByteCount) {
-		cache_ = new HashMap(initialSize, (float) 0.95);
+		cache_ = new HashMap<Object,CachedItem>(initialSize, (float) 0.95);
 		this.maximumSize = maximumSize;
 		this.holderFactory = holderFactory;
 		this.useByteCount = useByteCount;
@@ -165,7 +165,7 @@ final class Clock implements CacheManage
 		//if (delta < 5)
 		//	delta = 5;
 
-		holders = new ArrayList(initialSize);
+		holders = new ArrayList<CachedItem>(initialSize);
 		this.name = name;
 		active = true;
 
@@ -643,7 +643,7 @@ final class Clock implements CacheManage
 			boolean shrunk = false;
 
 			for (int position = 0; position < size; position++) {
-				CachedItem item = (CachedItem) holders.get(position);
+				CachedItem item = holders.get(position);
 
 				if (item.isKept())
 					continue;
@@ -729,7 +729,7 @@ final class Clock implements CacheManage
 			boolean shrunk = false;
 
 			for (int position = 0; position < size; position++) {
-				CachedItem item = (CachedItem) holders.get(position);
+				CachedItem item = holders.get(position);
 
 				if (!item.isValid())
 					continue;
@@ -884,7 +884,7 @@ final class Clock implements CacheManage
 				// items should start from the end.
 
 				for (int i = holders.size() - 1; (invalidItems > 0) && (i >= 0) ; i--) {
-					CachedItem item = (CachedItem) holders.get(i);
+					CachedItem item = holders.get(i);
 
 					if (item.isKept()) {
 						if (!item.isValid()) invalidItems--;
@@ -987,7 +987,7 @@ restartClock:
 							clockHand = 0;
 						}
 
-						item = (CachedItem) holders.get(clockHand);
+						item = holders.get(clockHand);
 
 						if (item.isKept())
 						{
@@ -1221,7 +1221,7 @@ restartClock:
 
 			for (int position = 0; position < size; position++) {
 
-				CachedItem item = (CachedItem) holders.get(position);
+				CachedItem item = holders.get(position);
 
 				if (item.isValid()) {
 					inUse++;
@@ -1349,7 +1349,7 @@ innerscan:
 				// items up, we may skip some items without cleaning.
 				for ( ;  position >= 0; position--, item = null) {
 
-					item = (CachedItem) holders.get(position);
+					item = holders.get(position);
 
 					if (!item.isValid())
 						continue innerscan;
@@ -1506,7 +1506,7 @@ innerscan:
 					break;			// done one round
 				}
 
-				item = (CachedItem) holders.get(currentPosition);
+				item = holders.get(currentPosition);
 
 				if (item.isKept())
 					continue;
@@ -1744,7 +1744,7 @@ innerscan:
                     
                 for( ; position < holders.size(); position++)
                 {
-                    item = (CachedItem) holders.get( position);
+                    item = holders.get( position);
                     if( null != item)
                     {
                         try
@@ -1795,7 +1795,7 @@ innerscan:
 		int invalidCount = 0;
         for (int i = 0; i <= endPosition; i++)
         {
-            CachedItem item = (CachedItem) holders.get(i);
+            CachedItem item = holders.get(i);
 
 			if (item.isKept())
 				continue;
@@ -1808,7 +1808,7 @@ innerscan:
 			// swap with an item later in the list
 			// try to keep free items at the end of the holders array.
 			for (; endPosition > i; endPosition--) {
-				CachedItem last = (CachedItem) holders.get(endPosition);
+				CachedItem last = holders.get(endPosition);
 				if (last.isValid()) {
 					holders.set(i, last);
 					holders.set(endPosition, item);
@@ -1837,7 +1837,7 @@ innerscan:
 		// remove items, starting at the end,  where
 		// hopefully most of the free items are.
 		for (int r = size - 1; r > newSize; r--) {
-			CachedItem remove = (CachedItem) holders.get(r);
+			CachedItem remove = holders.get(r);
 			if (remove.isKept() || remove.isValid()) {
 				continue;
 			}
@@ -1872,9 +1872,9 @@ innerscan:
 	 * @return a Collection of the cache elements.
 	 */
 	public synchronized Collection values() {
-		ArrayList al = new ArrayList();
-		for (Iterator i = cache_.values().iterator(); i.hasNext();){
-			al.add(((CachedItem)i.next()).getEntry());
+		ArrayList<Cacheable> al = new ArrayList<Cacheable>();
+		for (Iterator<CachedItem> i = cache_.values().iterator(); i.hasNext();){
+			al.add((i.next()).getEntry());
 		}
 		return al;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/BasicDaemon.java Tue May 14 20:46:59 2013
@@ -80,7 +80,7 @@ public class BasicDaemon implements Daem
 
 	private static final int OPTIMAL_QUEUE_SIZE = 100;
 
-	private final Vector subscription;
+	private final Vector<ServiceRecord> subscription;
 
 	// the context this daemon should run with
 	protected final ContextService contextService;
@@ -90,8 +90,8 @@ public class BasicDaemon implements Daem
 		Queues for the work to be done.
 		These are synchronized by this object.
 	*/
-	private final List highPQ;		// high priority queue
-	private final List normPQ;		// normal priority queue
+	private final List<ServiceRecord> highPQ;		// high priority queue
+	private final List<ServiceRecord> normPQ;		// normal priority queue
 
 	/**
 		which subscribed clients to service next?
@@ -130,9 +130,9 @@ public class BasicDaemon implements Daem
 		this.contextService = contextService;
 		this.contextMgr = contextService.newContextManager();
 
-		subscription = new Vector(1, 1);
-		highPQ = new java.util.LinkedList();
-		normPQ = new java.util.LinkedList();
+		subscription = new Vector<ServiceRecord>(1, 1);
+		highPQ = new java.util.LinkedList<ServiceRecord>();
+		normPQ = new java.util.LinkedList<ServiceRecord>();
 		
 		lastServiceTime = System.currentTimeMillis();
 	}
@@ -206,7 +206,7 @@ public class BasicDaemon implements Daem
 		}
 
 
-		List queue = serviceNow ? highPQ : normPQ;
+		List<ServiceRecord> queue = serviceNow ? highPQ : normPQ;
 
 		int highPQsize;
 		synchronized (this) {
@@ -336,7 +336,7 @@ public class BasicDaemon implements Daem
 
 			if (status == Serviceable.REQUEUE)
 			{
-				List queue = client.serviceASAP() ? highPQ : normPQ;
+				List<ServiceRecord> queue = client.serviceASAP() ? highPQ : normPQ;
 				synchronized (this) {
 					queue.add(clientRecord);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/SingleThreadDaemonFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/SingleThreadDaemonFactory.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/SingleThreadDaemonFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/daemon/SingleThreadDaemonFactory.java Tue May 14 20:46:59 2013
@@ -54,7 +54,7 @@ public class SingleThreadDaemonFactory i
 		// leaking class loaders.
 		try {
             AccessController.doPrivileged(
-             new PrivilegedAction() {
+             new PrivilegedAction<Object>() {
                 public Object run()  {
                     daemonThread.setContextClassLoader(null);
                     return null;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/jce/JCECipherFactory.java Tue May 14 20:46:59 2013
@@ -68,7 +68,7 @@ import org.apache.derby.io.StorageRandom
 
 	@see CipherFactory
  */
-public final class JCECipherFactory implements CipherFactory, java.security.PrivilegedExceptionAction
+public final class JCECipherFactory implements CipherFactory, java.security.PrivilegedExceptionAction<Object>
 {
     private final static String MESSAGE_DIGEST = "MD5";
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/ConcurrentLockSet.java Tue May 14 20:46:59 2013
@@ -953,7 +953,7 @@ forever:	for (;;) {
      * been seen and locked will be unlocked after the deadlock detection has
      * finished.
      */
-    public void addWaiters(Map waiters) {
+    public void addWaiters(Map<Object,Object> waiters) {
         seenByDeadlockDetection = new ArrayList<Entry>(locks.size());
         for (Entry entry : locks.values()) {
             seenByDeadlockDetection.add(entry);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Control.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Control.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Control.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Control.java Tue May 14 20:46:59 2013
@@ -50,7 +50,7 @@ public interface Control {
 
 	public boolean unlock(Latch lockInGroup, int unlockCount);
 
-	public void addWaiters(Map waiters);
+	public void addWaiters(Map<Object,Object> waiters);
 
 	public Lock getFirstGrant();
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Deadlock.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Deadlock.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Deadlock.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Deadlock.java Tue May 14 20:46:59 2013
@@ -155,7 +155,7 @@ class Deadlock  {
 		// - Compatibility space of waiter A
 		// - Stack of compatibility spaces with granted lock for waiter A
 
-		Stack chain = new Stack();
+		Stack<Object> chain = new Stack<Object>();
 
 		chain.push(startingLock.getCompatabilitySpace());
 		chain.push(control.getGrants());
@@ -167,7 +167,8 @@ outer:	for (;;) {
 				break outer;
 			}
 
-			List grants = (List) chain.peek();
+            @SuppressWarnings("unchecked")
+			List<Object> grants = (List<Object>) chain.peek();
 			if (grants.isEmpty()) {
                 // All granted locks in this lock control have been examined.
 				// pop this list of granted locks and back to the previous one
@@ -366,7 +367,7 @@ inner:		for (;;) {
      * @see LockControl#addWaiters(java.util.Map)
      */
 	private static Hashtable getWaiters(LockTable set) {
-		Hashtable waiters = new Hashtable();
+		Hashtable<Object,Object> waiters = new Hashtable<Object,Object>();
 		set.addWaiters(waiters);
 		return waiters;
 	}
@@ -466,7 +467,7 @@ inner:		for (;;) {
 
 		StringBuffer sb = new StringBuffer(200);
 
-		Hashtable attributes = new Hashtable(17);
+		Hashtable<String,Object> attributes = new Hashtable<String,Object>(17);
 
 		String victimXID = null;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockControl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockControl.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockControl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockControl.java Tue May 14 20:46:59 2013
@@ -56,8 +56,8 @@ final class LockControl implements Contr
 		has been created it is always used.
 	*/
 	private Lock				firstGrant;
-	private List				granted;
-	private List				waiting;
+	private List<Lock>				granted;
+	private List<Lock>				waiting;
 	private Lock				lastPossibleSkip;
 
 	protected LockControl(Lock firstLock, Lockable ref) {
@@ -78,10 +78,10 @@ final class LockControl implements Contr
 		this.firstGrant = copyFrom.firstGrant;
 
 		if (copyFrom.granted != null)
-			this.granted = new java.util.LinkedList(copyFrom.granted);
+			this.granted = new java.util.LinkedList<Lock>(copyFrom.granted);
 
 		if (copyFrom.waiting != null)
-			this.waiting = new java.util.LinkedList(copyFrom.waiting);
+			this.waiting = new java.util.LinkedList<Lock>(copyFrom.waiting);
 
 		this.lastPossibleSkip = copyFrom.lastPossibleSkip;
 	}
@@ -108,7 +108,7 @@ final class LockControl implements Contr
 
 		lockItem.grant();
 
-		List lgranted = granted;
+		List<Lock> lgranted = granted;
 		
 		if (lgranted == null) {
 			if (firstGrant == null) {
@@ -116,7 +116,7 @@ final class LockControl implements Contr
 				firstGrant = lockItem;
 			} else {
 				// second ever lock on this item
-				lgranted = granted = new java.util.LinkedList();
+				lgranted = granted = new java.util.LinkedList<Lock>();
 				lgranted.add(firstGrant);
 				lgranted.add(lockItem);
 				firstGrant = null;
@@ -136,7 +136,7 @@ final class LockControl implements Contr
 		if (unlockCount == 0)
 			unlockCount = lockInGroup.getCount();
 
-		List lgranted = granted;
+		List<Lock> lgranted = granted;
 			
 		// start at the begining of the list when there is one
 		for (int index = 0; unlockCount > 0; ) {
@@ -155,7 +155,7 @@ final class LockControl implements Contr
 				if (SanityManager.DEBUG) {
 					SanityManager.ASSERT(index != -1);
 				}
-				lockInSet = (Lock) lgranted.get(index);
+				lockInSet = lgranted.get(index);
 			}
 
 			unlockCount -= lockInSet.unlock(unlockCount);
@@ -201,7 +201,7 @@ final class LockControl implements Contr
         boolean grantLock    = false;
 
 		Lockable lref = ref;
-		List lgranted = granted;
+		List<Lock> lgranted = granted;
 
         {
             // Check to see if the only locks on the granted queue that
@@ -212,7 +212,7 @@ final class LockControl implements Contr
 			int endIndex = firstGrant == null ? lgranted.size() : 0;
 			do {
 
-				Lock gl = firstGrant == null ? (Lock) lgranted.get(index) : firstGrant;
+				Lock gl = firstGrant == null ? lgranted.get(index) : firstGrant;
 
                 boolean sameSpace = 
                     (gl.getCompatabilitySpace() == compatibilitySpace);
@@ -301,7 +301,7 @@ final class LockControl implements Contr
 			int endIndex = firstGrant == null ? granted.size() : 0;
 			do {
 
-				Lock gl = firstGrant == null ? (Lock) granted.get(index) : firstGrant;
+				Lock gl = firstGrant == null ? granted.get(index) : firstGrant;
 
 
 				boolean sameSpace =
@@ -374,7 +374,7 @@ final class LockControl implements Contr
 		}
 
 		if (waiting == null)
-			waiting = new java.util.LinkedList();
+			waiting = new java.util.LinkedList<Lock>();
 
 		// Add lock to the waiting list
 		addWaiter(waitingLock, ls);
@@ -392,7 +392,7 @@ final class LockControl implements Contr
 		if (firstGrant != null)
 			return false;
 
-		List lgranted = granted;
+		List<Lock> lgranted = granted;
 
 		return (lgranted == null) || lgranted.isEmpty();
 	}
@@ -493,10 +493,10 @@ final class LockControl implements Contr
 	public Lock getFirstGrant() {
 		return firstGrant;
 	}
-	public List getGranted() {
+	public List<Lock> getGranted() {
 		return granted;
 	}
-	public List getWaiting() {
+	public List<Lock> getWaiting() {
 		return waiting;
 	}
 
@@ -533,7 +533,7 @@ final class LockControl implements Contr
 		<LI>key=ActiveLock - value={LockControl for first waiter|ActiveLock of previosue waiter}
 		</OL>
 	*/
-	public void addWaiters(Map waiters) {
+	public void addWaiters(Map<Object,Object> waiters) {
 		
 		if ((waiting == null) || waiting.isEmpty())
 			return;
@@ -555,17 +555,17 @@ final class LockControl implements Contr
 		Return a Stack of the
 		held locks (Lock objects) on this Lockable.
 	*/
-	List getGrants() {
+	List<Lock> getGrants() {
 
-		List ret;
+		List<Lock> ret;
 
 		if (firstGrant != null) {
-			ret = new java.util.LinkedList();
+			ret = new java.util.LinkedList<Lock>();
 			ret.add(firstGrant);
 		}
 		else
 		{
-			ret = new java.util.LinkedList(granted);
+			ret = new java.util.LinkedList<Lock>(granted);
 		}
 
 		return ret;
@@ -580,14 +580,14 @@ final class LockControl implements Contr
 		if (isUnlocked())
 			return null;
 
-		List lgranted = granted;
+		List<Lock> lgranted = granted;
 
 
 		int index = 0;
 		int endIndex = firstGrant == null ? lgranted.size() : 0;
 		do {
 
-			Lock gl = firstGrant == null ? (Lock) lgranted.get(index) : firstGrant;
+			Lock gl = firstGrant == null ? lgranted.get(index) : firstGrant;
 
             if (gl.getCompatabilitySpace() != compatibilitySpace)
 				continue;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSet.java Tue May 14 20:46:59 2013
@@ -75,8 +75,8 @@ final class LockSet implements LockTable
 	private final SinglePool factory;
 
     /** Hash table which maps <code>Lockable</code> objects to
-     * <code>Lock</code>s. */
-    private final HashMap locks;
+     * <code>Control</code>s. */
+    private final HashMap<Lockable,Control> locks;
 
 	/**
 		Timeout for deadlocks, in ms.
@@ -103,7 +103,7 @@ final class LockSet implements LockTable
 
 	protected LockSet(SinglePool factory) {
 		this.factory = factory;
-		locks = new HashMap();
+		locks = new HashMap<Lockable,Control>();
 	}
 
 
@@ -706,7 +706,7 @@ forever:	for (;;) {
             String str = "";
 
             int i = 0;
-            for (Iterator it = locks.values().iterator(); it.hasNext(); )
+            for (Iterator<Control> it = locks.values().iterator(); it.hasNext(); )
             {
                 str += "\n  lock[" + i + "]: " + 
                     DiagnosticUtil.toDiagString(it.next());
@@ -725,9 +725,9 @@ forever:	for (;;) {
      * <br>
      * MT - must be synchronized on this <code>LockSet</code> object.
      */
-    public void addWaiters(Map waiters) {
-        for (Iterator it = locks.values().iterator(); it.hasNext(); ) {
-            Control control = (Control) it.next();
+    public void addWaiters(Map<Object,Object> waiters) {
+        for (Iterator<Control> it = locks.values().iterator(); it.hasNext(); ) {
+            Control control = it.next();
             control.addWaiters(waiters);
         }
     }
@@ -736,13 +736,13 @@ forever:	for (;;) {
 	/**
 	 * make a shallow clone of myself and my lock controls
 	 */
-	public synchronized Map shallowClone()
+	public synchronized Map<Lockable,Control> shallowClone()
 	{
-		HashMap clone = new HashMap();
+		HashMap<Lockable,Control> clone = new HashMap<Lockable,Control>();
 
-		for (Iterator it = locks.keySet().iterator(); it.hasNext(); )
+		for (Iterator<Lockable> it = locks.keySet().iterator(); it.hasNext(); )
 		{
-			Lockable lockable = (Lockable) it.next();
+			Lockable lockable = it.next();
 			Control control = getControl(lockable);
 
 			clone.put(lockable, control.shallowClone());
@@ -790,6 +790,6 @@ forever:	for (;;) {
 	 * MT - must be synchronized on this <code>LockSet</code> object.
 	 */
 	private final Control getControl(Lockable ref) {
-		return (Control) locks.get(ref);
+		return locks.get(ref);
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSpace.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSpace.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSpace.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockSpace.java Tue May 14 20:46:59 2013
@@ -52,7 +52,7 @@ import org.apache.derby.iapi.services.lo
 final class LockSpace implements CompatibilitySpace {
 
 	/** Map from group references to groups of locks. */
-	private final HashMap groups;
+	private final HashMap<Object,HashMap<Lock,Object>> groups;
 	/** Reference to the owner of this compatibility space. */
 	private final LockOwner owner;
 
@@ -70,7 +70,7 @@ final class LockSpace implements Compati
 	 * @param owner an object representing the owner of the compatibility space
 	 */
 	LockSpace(LockOwner owner) {
-		groups = new HashMap();
+		groups = new HashMap<Object,HashMap<Lock,Object>>();
 		this.owner = owner;
 	}
 
@@ -91,7 +91,7 @@ final class LockSpace implements Compati
 
 		Lock lockInGroup = null;
 
-		HashMap dl = (HashMap) groups.get(group);
+		HashMap<Lock,Object> dl = groups.get(group);
 		if (dl == null)	{
 			dl = getGroupMap(group);
 		} else if (lock.getCount() != 1) {
@@ -139,7 +139,7 @@ final class LockSpace implements Compati
 	*/
 
 	synchronized void unlockGroup(LockTable lset, Object group) {
-		HashMap dl = (HashMap) groups.remove(group);
+		HashMap<Lock,Object> dl = groups.remove(group);
 		if (dl == null)
 			return;
 
@@ -154,11 +154,12 @@ final class LockSpace implements Compati
 		saveGroup(dl);
 	}
 
-	private HashMap getGroupMap(Object group) {
+    @SuppressWarnings("unchecked")
+	private HashMap<Lock,Object> getGroupMap(Object group) {
 		HashMap[] sg = spareGroups;
-		HashMap dl = null;
+		HashMap<Lock,Object> dl = null;
 		for (int i = 0; i < 3; i++) {
-			dl = sg[i];
+			dl = (HashMap<Lock,Object>) sg[i];
 			if (dl != null) {
 				sg[i] = null;
 				break;
@@ -166,7 +167,7 @@ final class LockSpace implements Compati
 		}
 
 		if (dl == null)
-			dl = new HashMap(5, 0.8f);
+			dl = new HashMap<Lock,Object>(5, 0.8f);
 
 		groups.put(group, dl);
 		return dl;
@@ -186,7 +187,7 @@ final class LockSpace implements Compati
 		Unlock all locks in the group that match the key
 	*/
 	synchronized void unlockGroup(LockTable lset, Object group, Matchable key) {
-		HashMap dl = (HashMap) groups.get(group);
+		HashMap<Lock,Object> dl = groups.get(group);
 		if (dl == null)
 			return; //  no group at all
 
@@ -212,11 +213,11 @@ final class LockSpace implements Compati
 	}
 
 	synchronized void transfer(Object oldGroup, Object newGroup) {
-		HashMap from = (HashMap) groups.get(oldGroup);
+		HashMap<Lock,Object> from = groups.get(oldGroup);
 		if (from == null)
 			return;
 
-		HashMap to = (HashMap) groups.get(newGroup);
+		HashMap<Lock,Object> to = groups.get(newGroup);
 		if (to == null) {
 			// simple case 
 			groups.put(newGroup, from);
@@ -243,11 +244,11 @@ final class LockSpace implements Compati
 		groups.remove(oldGroup);
 	}
 
-	private void mergeGroups(HashMap from, HashMap into) {
+	private void mergeGroups(HashMap<Lock,Object> from, HashMap<Lock,Object> into) {
 
-		for (Iterator e = from.keySet().iterator(); e.hasNext(); ) {
+		for (Iterator<Lock> e = from.keySet().iterator(); e.hasNext(); ) {
 
-			Object lock = e.next();
+			Lock lock = e.next();
 
 			Object lockI = into.get(lock);
 
@@ -256,7 +257,7 @@ final class LockSpace implements Compati
 				into.put(lock, lock);
 			} else {
 				// merge the locks
-				Lock fromL = (Lock) lock;
+				Lock fromL = lock;
 				Lock intoL = (Lock) lockI;
 
 				intoL.count += fromL.getCount();
@@ -269,7 +270,7 @@ final class LockSpace implements Compati
 									 Object qualifier, Object group) {
 
 		// look for locks matching our reference and qualifier.
-		HashMap dl = (HashMap) groups.get(group);
+		HashMap<Lock,Object> dl = groups.get(group);
 		if (dl == null)
 			return 0;
 
@@ -315,7 +316,7 @@ final class LockSpace implements Compati
 	synchronized boolean isLockHeld(Object group, Lockable ref, Object qualifier) {
 
 		// look for locks matching our reference and qualifier.
-		HashMap dl = (HashMap) groups.get(group);
+		HashMap<Lock,Object> dl = groups.get(group);
 		if (dl == null)
 			return false;
 
@@ -355,10 +356,10 @@ final class LockSpace implements Compati
 
 		int count = 0;
 
-		for (Iterator it = groups.values().iterator(); it.hasNext(); ) {
-			HashMap group = (HashMap) it.next();
-			for (Iterator locks = group.keySet().iterator(); locks.hasNext(); ) {
-					Lock lock = (Lock) locks.next();
+		for (Iterator<HashMap<Lock,Object>> it = groups.values().iterator(); it.hasNext(); ) {
+			HashMap<Lock,Object> group = it.next();
+			for (Iterator<Lock> locks = group.keySet().iterator(); locks.hasNext(); ) {
+					Lock lock = locks.next();
 					count += lock.getCount();
 					if (count > bail)
 						return count;
@@ -374,11 +375,11 @@ final class LockSpace implements Compati
 	in a group.
 */
 
-class LockList implements Enumeration {
+class LockList implements Enumeration<Lockable> {
 
-	private Enumeration lockGroup;
+	private Enumeration<Lock> lockGroup;
 
-	LockList(Enumeration lockGroup) {
+	LockList(Enumeration<Lock> lockGroup) {
 		this.lockGroup = lockGroup;
 	}
 
@@ -386,7 +387,7 @@ class LockList implements Enumeration {
 		return lockGroup.hasMoreElements();
 	}
 
-	public Object nextElement() {
-		return ((Lock) lockGroup.nextElement()).getLockable();
+	public Lockable nextElement() {
+		return (lockGroup.nextElement()).getLockable();
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockTable.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/LockTable.java Tue May 14 20:46:59 2013
@@ -154,5 +154,5 @@ interface LockTable {
      * @param waiters the map to add the waiters to
      * @see LockControl#addWaiters
      */
-    void addWaiters(Map waiters);
+    void addWaiters(Map<Object,Object> waiters);
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/TableNameInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/TableNameInfo.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/TableNameInfo.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/TableNameInfo.java Tue May 14 20:46:59 2013
@@ -40,15 +40,15 @@ public class TableNameInfo {
 	private DataDictionary dd;
 	private Hashtable ddCache;			// conglomId -> conglomerateDescriptor
 	private Hashtable tdCache;			// tableID UUID -> table descriptor
-	private Hashtable tableCache;		// conglomId -> table descriptor
-	private Hashtable indexCache;		// conglomId -> indexname
+	private Hashtable<Long,TableDescriptor> tableCache;		// conglomId -> table descriptor
+	private Hashtable<Long,String> indexCache;		// conglomId -> indexname
 
 	public TableNameInfo(LanguageConnectionContext lcc, boolean andIndex)
 		throws StandardException {
 
-		tableCache = new Hashtable(31);
+		tableCache = new Hashtable<Long,TableDescriptor>(31);
 		if (andIndex)
-			indexCache = new Hashtable(13);
+			indexCache = new Hashtable<Long,String>(13);
 
 		TransactionController tc = lcc.getTransactionExecute();
 
@@ -63,7 +63,7 @@ public class TableNameInfo {
 			return "?";
 
 		// see if we have already seen this conglomerate
-		TableDescriptor td = (TableDescriptor) tableCache.get(conglomId);
+		TableDescriptor td = tableCache.get(conglomId);
 		if (td == null)
 		{
 			// first time we see this conglomerate, get it from the
@@ -137,7 +137,7 @@ public class TableNameInfo {
 
 		String type;
 
-		TableDescriptor td = (TableDescriptor) tableCache.get(conglomId);
+		TableDescriptor td = tableCache.get(conglomId);
 		if (td != null)
 		{
 			switch(td.getTableType())
@@ -170,6 +170,6 @@ public class TableNameInfo {
 	public String getIndexName(Long conglomId) {
 		if (conglomId == null)
 			return "?";
-		return (String) indexCache.get(conglomId);
+		return indexCache.get(conglomId);
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Timeout.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Timeout.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Timeout.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/locks/Timeout.java Tue May 14 20:46:59 2013
@@ -262,7 +262,7 @@ public final class Timeout
      */
     private void dumpLock() throws StandardException
     {
-        Hashtable attributes = new Hashtable(17);
+        Hashtable<String,Object> attributes = new Hashtable<String,Object>(17);
         Object lock_type = currentLock.getQualifier();
 
         // want containerId, segmentId, pageNum, recId from locktable

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/DatabaseClasses.java Tue May 14 20:46:59 2013
@@ -181,9 +181,9 @@ abstract class DatabaseClasses
 		try {
             FileOutputStream fis;
             try {
-                fis = (FileOutputStream) AccessController.doPrivileged(
-                        new PrivilegedExceptionAction() {
-                            public Object run() throws IOException {
+                fis = AccessController.doPrivileged(
+                        new PrivilegedExceptionAction<FileOutputStream>() {
+                            public FileOutputStream run() throws IOException {
                                 return new FileOutputStream(classFile);
                             }
                         });

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/JarLoader.java Tue May 14 20:46:59 2013
@@ -105,10 +105,10 @@ final class JarLoader extends SecureClas
 
 			if (installedJar instanceof File) {
                 try {
-                    jar = (JarFile) AccessController.doPrivileged
-                    (new java.security.PrivilegedExceptionAction(){
+                    jar = AccessController.doPrivileged
+                    (new java.security.PrivilegedExceptionAction<JarFile>(){
 
-                        public Object run() throws IOException {
+                        public JarFile run() throws IOException {
                         return new JarFile((File) installedJar);
 
                         }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/LoadedGeneratedClass.java Tue May 14 20:46:59 2013
@@ -91,7 +91,7 @@ public abstract class LoadedGeneratedCla
 	/*
 	** Methods for subclass
 	*/
-	protected Class getJVMClass() {
+	protected Class<?> getJVMClass() {
 		return ci.getClassObject();
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectClassesJava2.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectClassesJava2.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectClassesJava2.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectClassesJava2.java Tue May 14 20:46:59 2013
@@ -27,10 +27,10 @@ import org.apache.derby.iapi.util.ByteAr
 */
 
 public class ReflectClassesJava2 extends DatabaseClasses
-	implements java.security.PrivilegedAction
+	implements java.security.PrivilegedAction<Object>
 {
 
-	private java.util.HashMap preCompiled;
+	private java.util.HashMap<String,ReflectGeneratedClass> preCompiled;
 
 	private int action = -1;
 
@@ -39,10 +39,10 @@ public class ReflectClassesJava2 extends
 		if (classDump == null || classDump.getArray() == null) {
 
 			if (preCompiled == null)
-				preCompiled = new java.util.HashMap();
+				preCompiled = new java.util.HashMap<String,ReflectGeneratedClass>();
 			else
 			{
-				ReflectGeneratedClass gc = (ReflectGeneratedClass) preCompiled.get(fullyQualifiedName);
+				ReflectGeneratedClass gc = preCompiled.get(fullyQualifiedName);
 				if (gc != null)
 					return gc;
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectGeneratedClass.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectGeneratedClass.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectGeneratedClass.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/ReflectGeneratedClass.java Tue May 14 20:46:59 2013
@@ -33,7 +33,7 @@ import java.util.Hashtable;
 
 public final class ReflectGeneratedClass extends LoadedGeneratedClass {
 
-	private final Hashtable methodCache;
+	private final Hashtable<String,GeneratedMethod> methodCache;
 	private static final GeneratedMethod[] directs;
 
 	static {
@@ -45,13 +45,13 @@ public final class ReflectGeneratedClass
 
 	public ReflectGeneratedClass(ClassFactory cf, Class jvmClass) {
 		super(cf, jvmClass);
-		methodCache = new Hashtable();
+		methodCache = new Hashtable<String,GeneratedMethod>();
 	}
 
 	public GeneratedMethod getMethod(String simpleName)
 		throws StandardException {
 
-		GeneratedMethod rm = (GeneratedMethod) methodCache.get(simpleName);
+		GeneratedMethod rm = methodCache.get(simpleName);
 		if (rm != null)
 			return rm;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/reflect/UpdateLoader.java Tue May 14 20:46:59 2013
@@ -125,7 +125,7 @@ final class UpdateLoader implements Lock
             // Creating class loaders is a restricted operation
             // so we need to use a privileged block.
             AccessController.doPrivileged
-            (new java.security.PrivilegedAction(){
+            (new java.security.PrivilegedAction<Object>(){
                 
                 public Object run(){    
     		      for (int i = 0; i < jarCount; i++) {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/stream/SingleStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/stream/SingleStream.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/stream/SingleStream.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/stream/SingleStream.java Tue May 14 20:46:59 2013
@@ -70,7 +70,7 @@ import org.apache.derby.shared.common.re
  *
  */
 public final class SingleStream
-implements InfoStreams, ModuleControl, java.security.PrivilegedAction
+implements InfoStreams, ModuleControl, java.security.PrivilegedAction<HeaderPrintWriter>
 {
 
 	/*
@@ -216,7 +216,7 @@ implements InfoStreams, ModuleControl, j
 
 		Throwable t;
 		try {
-			Class theClass = Class.forName(className);
+			Class<?> theClass = Class.forName(className);
 
 			try {
 				Method theMethod = theClass.getMethod(methodName,  new Class[0]);
@@ -370,7 +370,7 @@ implements InfoStreams, ModuleControl, j
     }
 
 
-    public final Object run()
+    public final HeaderPrintWriter run()
     {
         // SECURITY PERMISSION - OP4, OP5
         return PBmakeFileHPW(PBfileName, PBheader);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java?rev=1482578&r1=1482577&r2=1482578&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/timer/SingletonTimerFactory.java Tue May 14 20:46:59 2013
@@ -68,9 +68,9 @@ public class SingletonTimerFactory
         ClassLoader savecl = null;
         boolean hasGetClassLoaderPerms = false;
         try {
-            savecl = (ClassLoader)AccessController.doPrivileged(
-            new PrivilegedAction() {
-                public Object run()  {
+            savecl = AccessController.doPrivileged(
+            new PrivilegedAction<ClassLoader>() {
+                public ClassLoader run()  {
                     return Thread.currentThread().getContextClassLoader();
                 }
             });
@@ -84,7 +84,7 @@ public class SingletonTimerFactory
         if (hasGetClassLoaderPerms)
             try {
                 AccessController.doPrivileged(
-                new PrivilegedAction() {
+                new PrivilegedAction<Object>() {
                     public Object run()  {
                         Thread.currentThread().setContextClassLoader(null);
                         return null;
@@ -101,7 +101,7 @@ public class SingletonTimerFactory
             try {
                 final ClassLoader tmpsavecl = savecl;
                 AccessController.doPrivileged(
-                new PrivilegedAction() {
+                new PrivilegedAction<Object>() {
                     public Object run()  {
                         Thread.currentThread().setContextClassLoader(tmpsavecl);
                         return null;



Mime
View raw message