Index: /trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 1845)
+++ /trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 1846)
@@ -10,4 +10,5 @@
 import java.util.Collection;
 import java.util.LinkedList;
+import java.util.List;
 
 import javax.swing.JOptionPane;
@@ -83,6 +84,6 @@
 
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        Collection<Node> nodes = new LinkedList<Node>();
-        Collection<Way> ways = new LinkedList<Way>();
+        List<Node> nodes = new LinkedList<Node>();
+        List<Way> ways = new LinkedList<Way>();
         EastNorth center = null;
         double radius = 0;
@@ -100,5 +101,5 @@
         // then use the way's nodes
         if ((nodes.size() <= 2) && (ways.size() == 1)) {
-            Way way = (Way) ways.toArray()[0];
+            Way way = ways.get(0);
 
             // some more special combinations:
@@ -111,11 +112,11 @@
             // distance between two nodes.
             if (nodes.size() > 0) {
-                if (nodes.size() == 1 && way.nodes.contains(nodes.toArray()[0])) {
+                if (nodes.size() == 1 && way.nodes.contains(nodes.get(0))) {
                     regular = true;
                 } else {
 
-                    center = ((Node) nodes.toArray()[way.nodes.contains(nodes.toArray()[0]) ? 1 : 0]).getEastNorth();
+                    center = nodes.get(way.nodes.contains(nodes.get(0)) ? 1 : 0).getEastNorth();
                     if (nodes.size() == 2) {
-                        radius = distance(((Node) nodes.toArray()[0]).getEastNorth(), ((Node) nodes.toArray()[1]).getEastNorth());
+                        radius = distance(nodes.get(0).getEastNorth(), nodes.get(1).getEastNorth());
                     }
                 }
@@ -144,6 +145,6 @@
             // See http://en.wikipedia.org/w/index.php?title=Centroid&oldid=294224857#Centroid_of_polygon for the equation used here
             for (int i = 0; i < nodes.size(); i++) {
-                EastNorth n0 = ((Node) nodes.toArray()[i]).getEastNorth();
-                EastNorth n1 = ((Node) nodes.toArray()[(i+1) % nodes.size()]).getEastNorth();
+                EastNorth n0 = nodes.get(i).getEastNorth();
+                EastNorth n1 = nodes.get((i+1) % nodes.size()).getEastNorth();
 
                 BigDecimal x0 = new BigDecimal(n0.east());
@@ -187,7 +188,7 @@
         if (regular) { // Make a regular polygon
             double angle = Math.PI * 2 / nodes.size();
-            pc = new PolarCoor(((Node) nodes.toArray()[0]).getEastNorth(), center, 0);
-
-            if (pc.angle > (new PolarCoor(((Node) nodes.toArray()[1]).getEastNorth(), center, 0).angle)) {
+            pc = new PolarCoor(nodes.get(0).getEastNorth(), center, 0);
+
+            if (pc.angle > (new PolarCoor(nodes.get(1).getEastNorth(), center, 0).angle)) {
                 angle *= -1;
             }
Index: /trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 1845)
+++ /trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 1846)
@@ -8,12 +8,13 @@
 import java.util.Collection;
 import java.util.LinkedList;
+import java.util.List;
 
 import javax.swing.JOptionPane;
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.AddCommand;
+import org.openstreetmap.josm.command.ChangeCommand;
 import org.openstreetmap.josm.command.Command;
-import org.openstreetmap.josm.command.AddCommand;
 import org.openstreetmap.josm.command.DeleteCommand;
-import org.openstreetmap.josm.command.ChangeCommand;
 import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.coor.EastNorth;
@@ -21,7 +22,6 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor;
 import org.openstreetmap.josm.tools.Shortcut;
-
-import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor;
 
 /**
@@ -84,5 +84,5 @@
 
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        Collection<Node> nodes = new LinkedList<Node>();
+        List<Node> nodes = new LinkedList<Node>();
         Way existingWay = null;
 
@@ -113,8 +113,8 @@
             // diameter: two single nodes needed or a way with two nodes
 
-            Node   n1 = ((Node)nodes.toArray()[0]);
+            Node   n1 = nodes.get(0);
             double x1 = n1.getEastNorth().east();
             double y1 = n1.getEastNorth().north();
-            Node   n2 = ((Node)nodes.toArray()[1]);
+            Node   n2 = nodes.get(1);
             double x2 = n2.getEastNorth().east();
             double y2 = n2.getEastNorth().north();
@@ -187,11 +187,11 @@
 
             // let's get some shorter names
-            Node   n1 = ((Node)nodes.toArray()[0]);
+            Node   n1 = nodes.get(0);
             double x1 = n1.getEastNorth().east();
             double y1 = n1.getEastNorth().north();
-            Node   n2 = ((Node)nodes.toArray()[1]);
+            Node   n2 = nodes.get(1);
             double x2 = n2.getEastNorth().east();
             double y2 = n2.getEastNorth().north();
-            Node   n3 = ((Node)nodes.toArray()[2]);
+            Node   n3 = nodes.get(2);
             double x3 = n3.getEastNorth().east();
             double y3 = n3.getEastNorth().north();
