In my code I have multiple instances of List<Future<something>> and I wanted to have a single method that handles the wait for them to complete. But I get a compiler exception telling me that actual argument List<Future<Boolean>> cannot be converted to List<Future<?>>.
This is the method head:
public void waitForIt(<List<Future<?>> params)
and this is how it is called:
...
List<Future<Boolean>> actions = new ArrayList<Future<Boolean>>();
waitForIt(actions); <-- compiler error here
...
I need this to work for List<Future<Map<String, String>>> and several other as well.
Use this:
as
Future<Boolean>is not extension ofFuture<?>http://ideone.com/tFECPN