Author: manik.surtani(a)jboss.com
Date: 2008-09-22 10:26:10 -0400 (Mon, 22 Sep 2008)
New Revision: 6769
Modified:
core/trunk/src/main/java/org/jboss/cache/Cache.java
core/trunk/src/main/java/org/jboss/cache/InternalNode.java
core/trunk/src/main/java/org/jboss/cache/Node.java
core/trunk/src/main/java/org/jboss/cache/NodeSPI.java
core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java
core/trunk/src/main/java/org/jboss/cache/mvcc/NodeReference.java
Log:
JBCACHE-1401: Node.putAll(Map<K, V>) should probably be Node.putAll(Map<? extends
K,? extends V>)
Modified: core/trunk/src/main/java/org/jboss/cache/Cache.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/Cache.java 2008-09-22 13:58:55 UTC (rev
6768)
+++ core/trunk/src/main/java/org/jboss/cache/Cache.java 2008-09-22 14:26:10 UTC (rev
6769)
@@ -178,7 +178,7 @@
* @param data mappings to copy
* @throws IllegalStateException if the cache is not in a started state
*/
- void put(Fqn fqn, Map<K, V> data);
+ void put(Fqn fqn, Map<? extends K, ? extends V> data);
/**
* Convenience method that takes a string representation of an Fqn. Otherwise
identical to {@link #put(Fqn, java.util.Map)}
@@ -187,7 +187,7 @@
* @param data data map to insert
* @throws IllegalStateException if the cache is not in a started state
*/
- void put(String fqn, Map<K, V> data);
+ void put(String fqn, Map<? extends K, ? extends V> data);
/**
* Removes the mapping for this key from a Node.
Modified: core/trunk/src/main/java/org/jboss/cache/InternalNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/InternalNode.java 2008-09-22 13:58:55 UTC
(rev 6768)
+++ core/trunk/src/main/java/org/jboss/cache/InternalNode.java 2008-09-22 14:26:10 UTC
(rev 6769)
@@ -29,7 +29,7 @@
V put(K key, V value);
- void putAll(Map<K, V> data);
+ void putAll(Map<? extends K, ? extends V> data);
V remove(K key);
@@ -37,7 +37,7 @@
Set<K> getKeys();
- void setInternalState(Map<K, V> state);
+ void setInternalState(Map state);
Map getInternalState(boolean onlyInternalState);
Modified: core/trunk/src/main/java/org/jboss/cache/Node.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/Node.java 2008-09-22 13:58:55 UTC (rev 6768)
+++ core/trunk/src/main/java/org/jboss/cache/Node.java 2008-09-22 14:26:10 UTC (rev 6769)
@@ -211,7 +211,7 @@
*
* @param map map to copy from
*/
- void putAll(Map<K, V> map);
+ void putAll(Map<? extends K, ? extends V> map);
/**
* Similar to {@link #putAll(java.util.Map)} except that it removes any entries that
exists in
@@ -220,7 +220,7 @@
*
* @param map map to copy from
*/
- void replaceAll(Map<K, V> map);
+ void replaceAll(Map<? extends K, ? extends V> map);
/**
Modified: core/trunk/src/main/java/org/jboss/cache/NodeSPI.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/NodeSPI.java 2008-09-22 13:58:55 UTC (rev
6768)
+++ core/trunk/src/main/java/org/jboss/cache/NodeSPI.java 2008-09-22 14:26:10 UTC (rev
6769)
@@ -369,7 +369,7 @@
* @param data to put
* @see #putAll(Map)
*/
- void putAllDirect(Map<K, V> data);
+ void putAllDirect(Map<? extends K, ? extends V> data);
/**
* Functionally the same as {@link #getData()} except that it operates directly on
the node and bypasses the
Modified: core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-09-22 13:58:55 UTC
(rev 6768)
+++ core/trunk/src/main/java/org/jboss/cache/UnversionedNode.java 2008-09-22 14:26:10 UTC
(rev 6769)
@@ -409,7 +409,7 @@
}
}
- public void putAll(Map<K, V> data)
+ public void putAll(Map<? extends K, ? extends V> data)
{
if (data != null)
{
@@ -554,7 +554,7 @@
n.flags = flags;
}
- public void setInternalState(Map<K, V> state)
+ public void setInternalState(Map state)
{
if (data == null)
{
@@ -567,12 +567,12 @@
}
}
- public Map<K, V> getInternalState(boolean onlyInternalState)
+ public Map getInternalState(boolean onlyInternalState)
{
if (onlyInternalState)
return new HashMap<K, V>(0);
// don't bother doing anything here
- if (data == null) return new HashMap<K, V>(0);
+ if (data == null) return new HashMap(0);
return new HashMap<K, V>(data);
}
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-09-22
13:58:55 UTC (rev 6768)
+++
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-09-22
14:26:10 UTC (rev 6769)
@@ -497,7 +497,7 @@
return remove(Fqn.fromString(fqn), key);
}
- public void put(Fqn fqn, Map<K, V> data)
+ public void put(Fqn fqn, Map<? extends K, ? extends V> data)
{
InvocationContext ctx = invocationContextContainer.get();
cacheStatusCheck(ctx);
@@ -505,7 +505,7 @@
invoker.invoke(ctx, command);
}
- public void put(String fqn, Map<K, V> data)
+ public void put(String fqn, Map<? extends K, ? extends V> data)
{
put(Fqn.fromString(fqn), data);
}
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java 2008-09-22
13:58:55 UTC (rev 6768)
+++
core/trunk/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java 2008-09-22
14:26:10 UTC (rev 6769)
@@ -202,7 +202,7 @@
return node.put(key, value);
}
- public void putAllDirect(Map<K, V> data)
+ public void putAllDirect(Map<? extends K, ? extends V> data)
{
node.putAll(data);
}
@@ -389,13 +389,13 @@
}
}
- public void putAll(Map<K, V> data)
+ public void putAll(Map<? extends K, ? extends V> data)
{
assertValid();
spi.put(getFqn(), data);
}
- public void replaceAll(Map<K, V> data)
+ public void replaceAll(Map<? extends K, ? extends V> data)
{
assertValid();
spi.clearData(getFqn());
Modified: core/trunk/src/main/java/org/jboss/cache/mvcc/NodeReference.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/mvcc/NodeReference.java 2008-09-22 13:58:55
UTC (rev 6768)
+++ core/trunk/src/main/java/org/jboss/cache/mvcc/NodeReference.java 2008-09-22 14:26:10
UTC (rev 6769)
@@ -181,7 +181,7 @@
return delegate.getKeys();
}
- public final void setInternalState(Map<K, V> state)
+ public final void setInternalState(Map state)
{
delegate.setInternalState(state);
}
@@ -206,7 +206,7 @@
delegate.setChildrenMapDirect(children);
}
- public final void putAll(Map<K, V> data)
+ public final void putAll(Map<? extends K, ? extends V> data)
{
delegate.putAll(data);
}