Author: ieb
Date: Mon Feb 16 12:39:23 2009
New Revision: 744906
URL: http://svn.apache.org/viewvc?rev=744906&view=rev
Log:
SHINDIG-920
Patch by Ben Smith
Change from <?> to <T> stops the need for a cast and therefore can remove
suppression of warnings.
thanks
Modified:
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/util/FutureUtil.java
Modified:
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/util/FutureUtil.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/util/FutureUtil.java?rev=744906&r1=744905&r2=744906&view=diff
==============================================================================
---
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/util/FutureUtil.java
(original)
+++
incubator/shindig/trunk/java/common/src/main/java/org/apache/shindig/common/util/FutureUtil.java
Mon Feb 16 12:39:23 2009
@@ -57,10 +57,9 @@
return collection.isDone();
}
- @SuppressWarnings("unchecked")
- private T getFirstFromCollection(RestfulCollection<?> collection) {
+ private T getFirstFromCollection(RestfulCollection<T> collection) {
if (collection.getTotalResults() > 0) {
- return (T) collection.getEntry().get(0);
+ return collection.getEntry().get(0);
}
return null;