Adding changes to fix Map/Collections

Merge branch 'master' of ssh://oss.readytalk.com/var/local/git/avian

Conflicts:

	classpath/java/util/HashMap.java
	classpath/java/util/Map.java
This commit is contained in:
mweaver 2009-04-22 11:34:32 -06:00
commit d6fb1e0c7c
6 changed files with 21 additions and 8 deletions

View File

@ -143,10 +143,10 @@ public class Collections {
public void clear() {
synchronized (lock) { map.clear(); }
}
public boolean containsKey(K key) {
public boolean containsKey(Object key) {
synchronized (lock) { return map.containsKey(key); }
}
public boolean containsValue(V value) {
public boolean containsValue(Object value) {
synchronized (lock) { return map.containsValue(value); }
}
public Set<java.util.Map.Entry<K, V>> entrySet() {

View File

@ -40,11 +40,11 @@ public class Hashtable<K, V> implements Map<K, V> {
return map.size();
}
public synchronized boolean containsKey(K key) {
public synchronized boolean containsKey(Object key) {
return map.containsKey(key);
}
public synchronized boolean containsValue(V value) {
public synchronized boolean containsValue(Object value) {
return map.containsValue(value);
}

View File

@ -29,11 +29,11 @@ public class IdentityHashMap<K, V> implements Map<K, V> {
return map.size();
}
public boolean containsKey(K key) {
public boolean containsKey(Object key) {
return map.containsKey(key);
}
public boolean containsValue(V value) {
public boolean containsValue(Object value) {
return map.containsValue(value);
}

View File

@ -15,9 +15,15 @@ public interface Map<K, V> {
public int size();
<<<<<<< HEAD:classpath/java/util/Map.java
public boolean containsKey(Object obj);
public boolean containsValue(Object obj);
=======
public boolean containsKey(Object key);
public boolean containsValue(Object value);
>>>>>>> af784f4cbc18911e29127bcda8110de9bb56d654:classpath/java/util/Map.java
public V get(Object key);

View File

@ -44,12 +44,12 @@ public class WeakHashMap<K, V> implements Map<K, V> {
return map.size();
}
public boolean containsKey(K key) {
public boolean containsKey(Object key) {
poll();
return map.containsKey(key);
}
public boolean containsValue(V value) {
public boolean containsValue(Object value) {
poll();
return map.containsValue(value);
}

View File

@ -334,6 +334,13 @@ test: build
$(executable) $(mode) "$(flags)" \
$(call class-names,$(test-build),$(test-classes))
.PHONY: tarball
tarball:
@echo "creating build/avian-$(version).tar.bz2"
@mkdir -p build
(cd .. && tar --exclude=build --exclude='.*' --exclude='*~' -cjf \
avian/build/avian-$(version).tar.bz2 avian)
.PHONY: javadoc
javadoc:
javadoc -sourcepath classpath -d build/javadoc -subpackages java \