Author: manik.surtani(a)jboss.com
Date: 2007-08-22 10:29:26 -0400 (Wed, 22 Aug 2007)
New Revision: 4308
Modified:
core/trunk/src/main/java/org/jboss/cache/CacheImpl.java
core/trunk/src/main/java/org/jboss/cache/Fqn.java
core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java
core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java
Log:
Moved suppress warnings annotation
Modified: core/trunk/src/main/java/org/jboss/cache/CacheImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/CacheImpl.java 2007-08-22 14:07:30 UTC (rev
4307)
+++ core/trunk/src/main/java/org/jboss/cache/CacheImpl.java 2007-08-22 14:29:26 UTC (rev
4308)
@@ -1834,6 +1834,7 @@
return retval;
}
+ @SuppressWarnings("unchecked")
public <E> Set<E> _getChildrenNames(Fqn<E> fqn) throws
CacheException
{
NodeSPI<K, V> n = findNode(fqn);
@@ -1846,8 +1847,7 @@
for (Object c : s)
{
NodeSPI child = (NodeSPI) c;
- if (!child.isDeleted()) {
- @SuppressWarnings("unchecked")
+ if (!child.isDeleted()) {
E e = (E)child.getFqn().getLastElement();
childNames.add(e);
}
Modified: core/trunk/src/main/java/org/jboss/cache/Fqn.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/Fqn.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/Fqn.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -362,13 +362,13 @@
}
}
+ @SuppressWarnings("unchecked")
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
short length = in.readShort();
this.elements = new ArrayList<E>(length);
for (int i = 0; i < length; i++)
{
- @SuppressWarnings("unchecked")
E e = (E) in.readObject();
elements.add(e);
}
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2007-08-22 14:07:30 UTC
(rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2007-08-22 14:29:26 UTC
(rev 4308)
@@ -35,7 +35,6 @@
// for now, we delegate RPC calls to deprecated methods in CacheImpl.
- @SuppressWarnings("deprecation")
public List callRemoteMethods(List<Address> recipients, MethodCall methodCall,
int mode, boolean excludeSelf, long timeout) throws Exception
{
return c.callRemoteMethods(recipients, methodCall, mode, excludeSelf, timeout);
@@ -51,13 +50,11 @@
return c.getCoordinator();
}
- @SuppressWarnings("deprecation")
public List callRemoteMethods(List<Address> recipients, MethodCall methodCall,
boolean synchronous, boolean excludeSelf, int timeout) throws Exception
{
return c.callRemoteMethods(recipients, methodCall, synchronous, excludeSelf,
timeout);
}
- @SuppressWarnings("deprecation")
public List callRemoteMethods(List<Address> recipients, Method method, Object[]
arguments, boolean synchronous, boolean excludeSelf, long timeout) throws Exception
{
return c.callRemoteMethods(recipients, method, arguments, synchronous, excludeSelf,
timeout);
Modified: core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2007-08-22
14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2007-08-22
14:29:26 UTC (rev 4308)
@@ -356,6 +356,7 @@
* null if there is no row with the fqn in the table,
* NULL_NODE_IN_ROW if there is a row in the table with the fqn but the node
column contains null.
*/
+ @SuppressWarnings("unchecked")
protected Map<Object, Object> loadNode(Fqn name)
{
boolean rowExists = false;
@@ -388,7 +389,6 @@
// Object marshalledNode = ois.readObject();
// deserialize result
- @SuppressWarnings("unchecked")
Map<Object, Object> oldNode = (Map<Object, Object>)
unmarshall(is);
return oldNode;
}
Modified: core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java 2007-08-22
14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java 2007-08-22
14:29:26 UTC (rev 4308)
@@ -1083,9 +1083,9 @@
/**
* Converts a database entry to a Map.
*/
+ @SuppressWarnings("unchecked")
private Map<Object, Object> makeDataObject(DatabaseEntry entry, boolean
createIfNull)
{
- @SuppressWarnings("unchecked")
Map<Object, Object> map = (Map<Object, Object>)
serialBinding.entryToObject(entry);
if (createIfNull && map == null)
{
Modified: core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-08-22
14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-08-22
14:29:26 UTC (rev 4308)
@@ -163,6 +163,7 @@
return node.getParent();
}
+ @SuppressWarnings("unchecked")
public NodeSPI<K, V> createChild(Object child_name, NodeSPI<K, V> parent,
CacheSPI<K, V> cache, DataVersion version)
{
if (child_name == null)
@@ -176,7 +177,6 @@
// if not we need to create it
if (child == null)
{
- @SuppressWarnings("unchecked")
NodeFactory<K, V> factory =
cache.getConfiguration().getRuntimeConfig().getNodeFactory();
child = (NodeSPI<K, V>) factory.createNodeOfType(parent, child_name,
parent, null);
optimisticChildNodeMap.put(child_name, child);
Modified:
core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java 2007-08-22
14:07:30 UTC (rev 4307)
+++
core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java 2007-08-22
14:29:26 UTC (rev 4308)
@@ -98,6 +98,7 @@
/**
* Try to figure out which TransactionManager to use
*/
+ @SuppressWarnings("unchecked")
private static void doLookups()
{
if (lookupFailed)
@@ -172,7 +173,6 @@
{
Class[] signature = null;
Object[] args = null;
- @SuppressWarnings("unchecked")
Method method = clazz.getMethod("getTransactionManager", signature);
tm = (TransactionManager) method.invoke(null, args);
}