Index: modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java =================================================================== --- modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java.orig 2006-05-17 14:15:10.000000000 +0100 +++ modules/luni-kernel/src/main/java/java/lang/ref/WeakReference.java 2006-05-17 14:16:37.000000000 +0100 @@ -21,7 +21,7 @@ * * @since JDK1.2 */ -public class WeakReference extends java.lang.ref.Reference { +public class WeakReference extends java.lang.ref.Reference { /** * Constructs a new instance of this class. @@ -32,7 +32,7 @@ * @param q * queue to register to the reference object with. */ - public WeakReference(Object r, ReferenceQueue q) { + public WeakReference(T r, ReferenceQueue q) { initReference(r, q); } @@ -43,7 +43,7 @@ * @param r * referent to track. */ - public WeakReference(Object r) { + public WeakReference(T r) { initReference(r); } } Index: modules/luni/src/main/java/java/util/HashMap.java =================================================================== --- modules/luni/src/main/java/java/util/HashMap.java.orig 2006-05-17 14:12:52.000000000 +0100 +++ modules/luni/src/main/java/java/util/HashMap.java 2006-05-17 14:41:18.000000000 +0100 @@ -24,8 +24,8 @@ * HashMap is an implementation of Map. All optional operations are supported, * adding and removing. Keys and values can be any objects. */ -public class HashMap extends AbstractMap implements Map, Cloneable, - Serializable { +public class HashMap extends AbstractMap implements Map, + Cloneable, Serializable { private static final long serialVersionUID = 362498820763181265L; transient int elementCount; @@ -40,12 +40,12 @@ private static final int DEFAULT_SIZE = 16; - static class Entry extends MapEntry { + static class Entry extends MapEntry { final int hash; - Entry next; + Entry next; - Entry(Object theKey, Object theValue) { + Entry(K theKey, V theValue) { super(theKey, theValue); this.hash = (theKey == null) ? 0 : theKey.hashCode(); } @@ -375,8 +375,8 @@ * the key * @return the value of the mapping with the specified key */ - public Object get(Object key) { - Entry m = getEntry(key); + public V get(Object key) { + Entry m = getEntry(key); if (m != null) { return m.value; } @@ -426,7 +426,7 @@ * * @return a Set of the keys */ - public Set keySet() { + public Set keySet() { if (keySet == null) { keySet = new AbstractSet() { public boolean contains(Object object) { @@ -535,8 +535,8 @@ * @return the value of the removed mapping or null if key is not a key in * this HashMap */ - public Object remove(Object key) { - Entry entry = removeEntry(key); + public V remove(Object key) { + Entry entry = removeEntry(key); if (entry != null) { return entry.value; } @@ -588,7 +588,7 @@ * * @return a Collection of the values */ - public Collection values() { + public Collection values() { if (valuesCollection == null) { valuesCollection = new AbstractCollection() { public boolean contains(Object object) { Index: modules/luni/src/main/java/java/util/LinkedHashSet.java =================================================================== --- modules/luni/src/main/java/java/util/LinkedHashSet.java.orig 2006-05-17 14:37:30.000000000 +0100 +++ modules/luni/src/main/java/java/util/LinkedHashSet.java 2006-05-17 14:38:33.000000000 +0100 @@ -27,7 +27,7 @@ * Like HashSet, LinkedHashSet is not thread safe, so access by multiple threads must be synchronized * by an external mechanism such as Collections.synchronizedSet. */ -public class LinkedHashSet extends HashSet implements Set, Cloneable, +public class LinkedHashSet extends HashSet implements Set, Cloneable, Serializable { private static final long serialVersionUID = -2851667679971038690L; @@ -69,7 +69,7 @@ * @param collection * the collection of elements to add */ - public LinkedHashSet(Collection collection) { + public LinkedHashSet(Collection collection) { super(new LinkedHashMap(collection.size() < 6 ? 11 : collection.size() * 2)); Iterator it = collection.iterator(); Index: modules/luni/src/main/java/java/util/WeakHashMap.java =================================================================== --- modules/luni/src/main/java/java/util/WeakHashMap.java.orig 2006-05-17 14:23:40.000000000 +0100 +++ modules/luni/src/main/java/java/util/WeakHashMap.java 2006-05-17 14:36:20.000000000 +0100 @@ -24,7 +24,7 @@ * optional operations are supported, adding and removing. Keys and values can * be any objects. */ -public class WeakHashMap extends AbstractMap implements Map { +public class WeakHashMap extends AbstractMap implements Map { private final ReferenceQueue referenceQueue; @@ -40,12 +40,12 @@ private static final int DEFAULT_SIZE = 16; - private static final class Entry extends WeakReference implements Map.Entry { + private static final class Entry extends WeakReference implements Map.Entry { int hash; boolean isNull; - Object value; + V value; Entry next; @@ -53,23 +53,23 @@ Object get(Map.Entry entry); } - Entry(Object key, Object object, ReferenceQueue queue) { + Entry(K key, V object, ReferenceQueue queue) { super(key, queue); isNull = key == null; hash = isNull ? 0 : key.hashCode(); value = object; } - public Object getKey() { + public K getKey() { return super.get(); } - public Object getValue() { + public V getValue() { return value; } - public Object setValue(Object object) { - Object result = value; + public V setValue(V object) { + V result = value; value = object; return result; } @@ -388,11 +388,11 @@ * the key * @return the value of the mapping with the specified key */ - public Object get(Object key) { + public V get(Object key) { poll(); if (key != null) { int index = (key.hashCode() & 0x7FFFFFFF) % elementData.length; - Entry entry = elementData[index]; + Entry entry = elementData[index]; while (entry != null) { if (key.equals(entry.get())) return entry.value; @@ -400,7 +400,7 @@ } return null; } - Entry entry = elementData[0]; + Entry entry = elementData[0]; while (entry != null) { if (entry.isNull) return entry.value; @@ -574,10 +574,10 @@ * @return the value of the removed mapping or null if key is not a key in * this WeakHashMap */ - public Object remove(Object key) { + public V remove(Object key) { poll(); int index = 0; - Entry entry, last = null; + Entry entry, last = null; if (key != null) { index = (key.hashCode() & 0x7FFFFFFF) % elementData.length; entry = elementData[index]; Index: modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/client/DirtyTask.java =================================================================== --- modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/client/DirtyTask.java.orig 2006-05-17 14:41:51.000000000 +0100 +++ modules/rmi/src/main/java/org/apache/harmony/rmi/internal/dgc/client/DirtyTask.java 2006-05-17 14:42:01.000000000 +0100 @@ -155,7 +155,7 @@ taskScheduler.schedule(retryTask, 2000); if (dirtyDataMap.isEmpty()) { this.cancel(); - taskScheduler.purge(); + // FIXME: taskScheduler.purge(); dirtyTaskTable.remove(period); } }