diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java index 6e67abc3a5..88842af628 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java @@ -96,6 +96,7 @@ public class EC2ListNodesStrategy implements ListNodesStrategy { @SuppressWarnings("unchecked") @Override public Future>> apply(String from) { + // see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7126754 return castToSpecificTypedFuture(client.getInstanceServices().describeInstancesInRegion(from)); } @@ -104,7 +105,6 @@ public class EC2ListNodesStrategy implements ListNodesStrategy { return concat(concat(reservations)); } - // "hide" this cast (i.e. do not perform inline) from the Java 7 compiler - see http://stackoverflow.com/questions/8637937/why-does-a-generic-cast-of-a-list-extends-set-to-listset-succeed-on-sun @SuppressWarnings("unchecked") private static Future castToSpecificTypedFuture(Future input) { return (Future) input;