[jboss-remoting-commits] JBoss Remoting SVN: r5581 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/stream.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Wed Nov 4 16:34:33 EST 2009
Author: david.lloyd at jboss.com
Date: 2009-11-04 16:34:33 -0500 (Wed, 04 Nov 2009)
New Revision: 5581
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/stream/Streams.java
Log:
Minor generics fix
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/stream/Streams.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/stream/Streams.java 2009-11-04 02:11:18 UTC (rev 5580)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/stream/Streams.java 2009-11-04 21:34:33 UTC (rev 5581)
@@ -140,7 +140,7 @@
* it is recommended that the instance be discarded if an exception is thrown.
* <p>
* An example usage which meets this requirement would be: <code><pre>
- * final IoFuture<List<Foo>> futureFooList = getFutureCollection(executor, new ArrayList<Foo>(), fooSource);
+ * final IoFuture<? extends List<Foo>> futureFooList = getFutureCollection(executor, new ArrayList<Foo>(), fooSource);
* </pre></code>
*
* @param executor the executor in which to run asynchronous tasks
@@ -151,7 +151,7 @@
* @return the new future collection, populated
* @throws IOException if an error occurs
*/
- public static <C extends Collection<T>, T> IoFuture<C> getFutureCollection(Executor executor, final C newCollection, final ObjectSource<T> objectSource) {
+ public static <C extends Collection<T>, T> IoFuture<? extends C> getFutureCollection(Executor executor, final C newCollection, final ObjectSource<T> objectSource) {
final FutureResult<C> futureResult = new FutureResult<C>(executor);
futureResult.addCancelHandler(new Cancellable() {
public Cancellable cancel() {
@@ -187,7 +187,7 @@
* it is recommended that the instance be discarded if an exception is thrown.
* <p>
* An example usage which meets this requirement would be: <code><pre>
- * final IoFuture<Map<Foo, Bar>> futureFooBarMap = getFutureMap(executor, new HashMap<Foo, Bar>(), fooBarSource);
+ * final IoFuture<? extends Map<Foo, Bar>> futureFooBarMap = getFutureMap(executor, new HashMap<Foo, Bar>(), fooBarSource);
* </pre></code>
*
* @param newMap the new map to populate
@@ -197,7 +197,7 @@
* @param <V> the map value type
* @return the new map, populated
*/
- public static <M extends Map<K, V>, K, V> IoFuture<M> getFutureMap(Executor executor, final M newMap, final ObjectSource<Pair<K, V>> objectSource) {
+ public static <M extends Map<K, V>, K, V> IoFuture<? extends M> getFutureMap(Executor executor, final M newMap, final ObjectSource<Pair<K, V>> objectSource) {
final FutureResult<M> futureResult = new FutureResult<M>(executor);
futureResult.addCancelHandler(new Cancellable() {
public Cancellable cancel() {
More information about the jboss-remoting-commits
mailing list