Index: applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java
===================================================================
--- applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 30736)
+++ applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java	(revision 30737)
@@ -8,4 +8,5 @@
 import java.util.ListIterator;
 import java.util.Set;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.gui.MapView;
@@ -13,9 +14,9 @@
 public class DrawnPolyLine {
     MapView mv;
-    private LinkedList<LatLon> points = new LinkedList<LatLon>();
-    private LinkedList<LatLon> simplePoints = new LinkedList<LatLon>();
+    private LinkedList<LatLon> points = new LinkedList<>();
+    private LinkedList<LatLon> simplePoints = new LinkedList<>();
     private Set<LatLon> used;
-    private Set<LatLon> fixed = new HashSet<LatLon>();
-    
+    private Set<LatLon> fixed = new HashSet<>();
+
     private int lastIdx;
     private boolean closedFlag;
@@ -31,5 +32,5 @@
         return fixed.contains(pp2);
     }
-    
+
     double getLength() {
         List<LatLon> pts = getPoints();
@@ -55,5 +56,5 @@
         return (simplePoints!=null && simplePoints.size()>0);
     }
-    
+
     int findClosestPoint(Point p, double d) {
         double x=p.x, y=p.y;
@@ -87,5 +88,5 @@
         }
     }
-    
+
     void fixPoint(LatLon p) {
         fixed.add(p);
@@ -100,11 +101,11 @@
         return fixed;
     }
-    
+
     void addLast(LatLon coor) {
         if (closedFlag && lastIdx>points.size()-1) return;
         if (lastIdx>=points.size()-1) {
-            // 
+            //
             if (points.isEmpty() || !coor.equals(points.getLast())) {
-                points.addLast(coor); 
+                points.addLast(coor);
                 if (points.size()>1) lastIdx++;
                 }
@@ -112,10 +113,10 @@
             // insert point into midlle of the line
             if (points.isEmpty() || !coor.equals(points.get(lastIdx))) {
-                points.add(lastIdx+1, coor); 
-                lastIdx++; 
-            }
-        }
-    }
-  
+                points.add(lastIdx+1, coor);
+                lastIdx++;
+            }
+        }
+    }
+
     Point getLastPoint() {
         if (lastIdx<points.size()) return getPoint(points.get(lastIdx));
@@ -126,9 +127,9 @@
         return mv.getPoint(p);
     }
-    
+
     int getSimplePointsCount() {
         if (simplePoints!=null)return simplePoints.size(); else return -1;
     }
-    
+
     /**
      * Increase epsilon to fit points count in maxPKM point per 1 km
@@ -146,5 +147,5 @@
         return e;
     }
-            
+
     /**
      * Simplified drawn line, not touching the nodes includes in "fixed" set.
@@ -154,5 +155,5 @@
         int n = points.size();
         if (n < 3) return;
-        used = new HashSet<LatLon>(n);
+        used = new HashSet<>(n);
         int start = 0;
         for (int i = 0; i < n; i++) {
@@ -166,5 +167,5 @@
             }
         }
-        simplePoints = new LinkedList<LatLon>();
+        simplePoints = new LinkedList<>();
         simplePoints.addAll(points);
         simplePoints.retainAll(used);
@@ -192,5 +193,5 @@
 
         if (end - start < 2) return;
-        
+
         int farthest_node = -1;
         double farthest_dist = 0;
@@ -233,13 +234,13 @@
         return closedFlag;
     }
-    
+
     void deleteNode(int idx) {
         if (idx<=lastIdx) lastIdx--;
         fixed.remove(points.get(idx));
-        points.remove(idx); 
+        points.remove(idx);
     }
     void tryToDeleteSegment(Point p) {
         if (points.size()<3) return;
-        
+
         LatLon start;
         start = findBigSegment(p);
@@ -261,7 +262,7 @@
                 return;
             }
-            
+
             // if we are deleting this segment
-            if (f) it.remove(); 
+            if (f) it.remove();
             if (pp == start) {f=true;idx=i;} // next node should be removed
             i++;
@@ -273,5 +274,5 @@
      *  line fragment = segments between two fixed (green) nodes
      * @param p
-     * @return 
+     * @return
      */
     LatLon findBigSegment(Point p) {
@@ -291,13 +292,13 @@
         if (pointSegmentDistance(p,p1,p2) < 5) {
             return start;
-        } 
+        }
         } while (it2.hasNext());
         return null;
-        
+
     }
 
     private double pointSegmentDistance(Point p, Point p1, Point p2) {
         double a,b,x,y,l,kt,kn,dist;
-        x=p.x-p1.x; y=p.y-p1.y; 
+        x=p.x-p1.x; y=p.y-p1.y;
         a=p2.x-p1.x; b=p2.y-p1.y;
         l=Math.hypot(a,b);
@@ -344,5 +345,5 @@
          }
     }
-        
+
     /**
      * Returns maximum number of simplified line points divided by line segment length
@@ -357,5 +358,5 @@
         if (k<2) k=2;
         if (k>n) k=n;
-        
+
         LatLon pp1, pp2=null;
         Iterator<LatLon> it1,it2;
@@ -385,5 +386,5 @@
             }
         return Math.round(maxpkm);
-            
+
     }
 
