Index: /applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java
===================================================================
--- /applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java	(revision 30630)
+++ /applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java	(revision 30631)
@@ -19,5 +19,4 @@
 import com.tilusnet.josm.plugins.alignways.geometry.AlignWaysGeomLine.IntersectionStatus;
 import com.tilusnet.josm.plugins.alignways.geometry.AlignWaysGeomPoint;
-
 
 /**
@@ -27,9 +26,7 @@
 public class AlignWaysCmdKeepAngles extends AlignWaysCmdKeepLength {
 
-    AlignableStatus alignableStatKeepAngles = AlignableStatus.ALGN_VALID;
+    private AlignableStatus alignableStatKeepAngles = AlignableStatus.ALGN_VALID;
 
     public AlignWaysCmdKeepAngles() {
-        super();
-
         // Now the calculatedNodes reflect the coordinates that we'd have
         // without preserving the angles, i.e. preserving the length.
@@ -48,9 +45,7 @@
         recalculateNodesAndValidate(lineKeepLength, nodeArr[0]);
         recalculateNodesAndValidate(lineKeepLength, nodeArr[1]);
-
-    }
-
-
-    void recalculateNodesAndValidate(AlignWaysGeomLine alignedLineKeepLength, Node endpoint) {
+    }
+
+    private void recalculateNodesAndValidate(AlignWaysGeomLine alignedLineKeepLength, Node endpoint) {
 
         if (endpoint.getEastNorth().equals(pivot)) {
@@ -60,5 +55,6 @@
         
         ArrayList<WaySegment> alws = algnSeg.getAdjacentWaySegments(endpoint);
-        if (alws.size() <= 2) {
+        int alwsSize = alws.size();
+        if (0 < alwsSize && alwsSize <= 2) {
             // We need the intersection point of
             //  - the alignee following the keep length rule
@@ -70,5 +66,5 @@
             EastNorth enAdjOther2 = null;
 
-            if (alws.size() == 2) {
+            if (alwsSize == 2) {
                 adjOther2 = getNonEqualNode(alws.get(1), endpoint);
                 enAdjOther2 = adjOther2.getEastNorth();
@@ -106,5 +102,5 @@
             // triggers complications.
             // TODO - find a solution
-            if (alws.size() == 2 && enIsectPt != null) {
+            if (alwsSize == 2 && enIsectPt != null) {
                 int middlePtIdx = AlignWaysGeomPoint.getMiddleOf3(
                         new AlignWaysGeomPoint(enIsectPt), 
@@ -155,7 +151,5 @@
             alignableStatKeepAngles = AlignableStatus.ALGN_INV_TOOMANY_CONNECTED_WS;
         }
-
-    }
-
+    }
 
     private boolean isEnSetCollinear(ArrayList<EastNorth> enAdjPts) {
@@ -169,5 +163,4 @@
         return AlignWaysGeomPoint.isSetCollinear(awAdjPts);
     }
-
 
     private Node getNonEqualNode(WaySegment waySegment, Node endpoint) {
@@ -179,5 +172,4 @@
             return null;
     }
-
 
     /**
@@ -222,7 +214,5 @@
                 JOptionPane.WARNING_MESSAGE
                 );
-
-    }
-
+    }
 
     /**
