From d3ab85918efc21cb7367dc9916ec294a43c3a163 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 5 Jan 2012 15:31:44 -0500 Subject: [PATCH] Updated explanation of a potentially unexpected cast to refer to the JDK bug that necessitates it --- .../org/jclouds/ec2/compute/strategy/EC2ListNodesStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;