harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r405191 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
Date Mon, 08 May 2006 22:03:16 GMT
Author: tellison
Date: Mon May  8 15:03:14 2006
New Revision: 405191

URL: http://svn.apache.org/viewcvs?rev=405191&view=rev
Log:
Generics uplift

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java?rev=405191&r1=405190&r2=405191&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java
Mon May  8 15:03:14 2006
@@ -70,7 +70,7 @@
 	private boolean enableResolve; // Resolve object is a mechanism for
 									// replacement
 
-	private Hashtable objectsRead; // Table mapping Integer (handle) -> Object
+	private Hashtable<Integer,Object> objectsRead; // Table mapping Integer (handle) ->
Object
 
 	private Object currentObject; // Used by defaultReadObject
 
@@ -1230,7 +1230,7 @@
 		if (object == null && mustResolve)
 			throw new NotActiveException();
 
-		ArrayList streamClassList = new ArrayList(32);
+		ArrayList<ObjectStreamClass> streamClassList = new ArrayList<ObjectStreamClass>(32);
 		ObjectStreamClass nextStreamClass = classDesc;
 		while (nextStreamClass != null) {
 			streamClassList.add(0, nextStreamClass);
@@ -1244,7 +1244,7 @@
 				readObjectForClass(object, streamClass);
 			}
 		} else {
-			ArrayList classList = new ArrayList(32);
+			ArrayList<Class> classList = new ArrayList<Class>(32);
 			Class nextClass = object.getClass();
 			while (nextClass != null) {
 				Class testClass = nextClass.getSuperclass();
@@ -2188,11 +2188,9 @@
 
 	/**
 	 * Reset the collection of objects already loaded by the receiver.
-	 * 
-	 * 
 	 */
 	private void resetSeenObjects() {
-		objectsRead = new Hashtable();
+		objectsRead = new Hashtable<Integer,Object>();
 		currentHandle = baseWireHandle;
 		primitiveData = emptyStream;
 	}
@@ -2201,7 +2199,6 @@
 	 * Reset the receiver. The collection of objects already read by the
 	 * receiver is reset, and internal structures are also reset so that the
 	 * receiver knows it is in a fresh clean state.
-	 * 
 	 */
 	private void resetState() {
 		resetSeenObjects();
@@ -2234,7 +2231,6 @@
 	 * If <code>enableResolveObject()</code> was activated, computes the
 	 * replacement object for the original object <code>object</code> and
 	 * returns the replacement. Otherwise returns <code>object</code>.
-	 * 
 	 * 
 	 * @param object
 	 *            Original object for which a replacement may be defined



Mime
View raw message