Hi Folks!
I'm running into a compiler warning when using generics with an Implementation of the Callable interface in conjunction with an ExecutorService. (The implementor of the Callable interface is a node in a tree structure.)
I've attached a shortened version of the code below. I'm getting the warning on the line that calls the invokeAll() method on the ExecutorService: "Type safety: Unchecked invocation invokeAll(Collection) of the generic method invokeAll(Collection<Callable<T>>
of type ExecutorService"
I've tried a wide variety of generics tagging to avoid this warning, but can't seem to find a valid approach that solves the warning and still allows me to treat the "children" collection as a collection of CallableNode objects rather than just a Collection of Callable objects.
Any help would be appreciated!
Mike
[ June 27, 2006: Message edited by: Michael Schulz ]
[ June 27, 2006: Message edited by: Michael Schulz ]