Index: /applications/editors/josm/plugins/livegps/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- /applications/editors/josm/plugins/livegps/.settings/org.eclipse.jdt.ui.prefs	(revision 33045)
+++ /applications/editors/josm/plugins/livegps/.settings/org.eclipse.jdt.ui.prefs	(revision 33045)
@@ -0,0 +1,61 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_jautodoc.cleanup.add_header=false
+sp_jautodoc.cleanup.replace_header=false
Index: /applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/AppendableGpxTrackSegment.java	(revision 33045)
@@ -1,2 +1,3 @@
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 33045)
@@ -1,2 +1,3 @@
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
@@ -132,5 +133,5 @@
                         Thread.sleep(1000);
                     } catch (InterruptedException ignore) {
-                        
+
                     }
                 }
@@ -161,5 +162,5 @@
                 oldGpsData = gpsData;
             } catch (IOException iox) {
-                Main.warn("LiveGps: lost connection to gpsd");
+                Main.warn(iox, "LiveGps: lost connection to gpsd");
                 fireGpsStatusChangeEvent(
                         LiveGpsStatus.GpsStatus.CONNECTION_FAILED,
@@ -168,5 +169,7 @@
                 try {
                     Thread.sleep(1000);
-                } catch (InterruptedException ignore) {} 
+                } catch (InterruptedException ignore) {
+                    Main.trace(ignore);
+                }
                 // send warning to layer
             }
@@ -246,5 +249,5 @@
 
     private void disconnect() {
-        assert(gpsdSocket != null);
+        assert gpsdSocket != null;
 
         connected = false;
@@ -324,5 +327,7 @@
                         speed = Float.parseFloat(status[9]);
                         course = Float.parseFloat(status[8]);
-                    } catch (NumberFormatException nex) {}
+                    } catch (NumberFormatException nex) {
+                        Main.debug(nex);
+                    }
                     return new LiveGpsData(lat, lon, course, speed);
                 }
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java	(revision 33045)
@@ -1,5 +1,3 @@
-/**
- *
- */
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
@@ -151,10 +149,10 @@
      */
     public String getWayInfo() {
-        if(wayString == null) {
+        if (wayString == null) {
             Way way = getWay();
-            if(way != null) {
+            if (way != null) {
                 StringBuilder builder = new StringBuilder();
                 String tmp = way.get("name");
-                if(tmp != null) {
+                if (tmp != null) {
                     builder.append(tmp);
                 } else {
@@ -162,21 +160,21 @@
                 }
                 tmp = way.get("ref");
-                if(tmp != null) {
+                if (tmp != null) {
                     builder.append(" (").append(tmp).append(")");
                 }
                 tmp = way.get("highway");
-                if(tmp != null) {
+                if (tmp != null) {
                     builder.append(" {").append(tmp).append("}");
                 }
                 String type = "";
                 tmp = way.get("tunnel");
-                if(tmp != null) {
+                if (tmp != null) {
                     type = type + "T";
                 }
                 tmp = way.get("bridge");
-                if(tmp != null) {
+                if (tmp != null) {
                     type = type + "B";
                 }
-                if(type.length() > 0) {
+                if (type.length() > 0) {
                     builder.append(" [").append(type).append("]");
                 }
@@ -194,5 +192,5 @@
      */
     public Way getWay() {
-        if(way == null && Main.map != null && Main.map.mapView != null) {
+        if (way == null && Main.map != null && Main.map.mapView != null) {
             Point xy = Main.map.mapView.getPoint(getLatLon());
             way = Main.map.mapView.getNearestWay(xy, OsmPrimitive::isUsable);
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDialog.java	(revision 33045)
@@ -1,5 +1,3 @@
-/**
- *
- */
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
@@ -69,5 +67,5 @@
             return;
 
-        if("gpsdata".equals(evt.getPropertyName())) {
+        if ("gpsdata".equals(evt.getPropertyName())) {
             data = (LiveGpsData) evt.getNewValue();
 
@@ -75,5 +73,5 @@
             @Override
             public void run() {
-                if(data.isFix()) {
+                if (data.isFix()) {
                     panel.setBackground(Color.WHITE);
                     latLabel.setText(data.getLatitude() + "deg");
@@ -84,5 +82,5 @@
 
                     String wayString = data.getWayInfo();
-                    if(wayString.length() > 0) {
+                    if (!wayString.isEmpty()) {
                         wayLabel.setText(wayString);
                     } else {
@@ -104,5 +102,5 @@
             public void run() {
                 statusLabel.setText(status.getStatusMessage());
-                if(status.getStatus() != LiveGpsStatus.GpsStatus.CONNECTED) {
+                if (status.getStatus() != LiveGpsStatus.GpsStatus.CONNECTED) {
                     panel.setBackground(Color.RED);
                 } else {
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 33045)
@@ -1,2 +1,3 @@
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
@@ -6,6 +7,6 @@
 import java.awt.Graphics2D;
 import java.awt.Point;
+import java.awt.Rectangle;
 import java.awt.geom.Point2D;
-import java.awt.Rectangle;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
@@ -115,32 +116,32 @@
         if (lastPoint == null)
             return;
-    
+
         Point screen = mv.getPoint(lastPoint.getCoor());
-    
+
         int TriaHeight = Main.pref.getInteger(C_CURSOR_H, 20);
         int TriaWidth = Main.pref.getInteger(C_CURSOR_W, 10);
         int TriaThick = Main.pref.getInteger(C_CURSOR_T, 4);
-    
+
         /*
          * Draw a bold triangle.
          * In case of deep zoom draw also a thin DOP oval.
          */
-    
+
         g.setColor(COLOR_POSITION_ESTIMATE.get());
         int w, h;
         double ppm = 100 / mv.getDist100Pixel();    /* pixels per metre */
-    
+
         w = (int )Math.round(lastData.getEpx() * ppm);
         h = (int )Math.round(lastData.getEpy() * ppm);
-    
+
         if (w > TriaWidth || h > TriaWidth) {
             int xo, yo;
-    
+
             yo = screen.y - Math.round(h/2);
             xo = screen.x - Math.round(w/2);
-    
+
             g.drawOval(xo, yo, w, h);
         }
-    
+
         int[] x = new int[4];
         int[] y = new int[4];
@@ -152,9 +153,9 @@
         float csin240 = (float )Math.sin(Math.toRadians(course + 240));
         float ccos240 = (float )Math.cos(Math.toRadians(course + 240));
-    
+
         g.setColor(COLOR_POSITION.get());
-    
+
         for (int i = 0; i < TriaThick; i++, TriaHeight--, TriaWidth--) {
-    
+
             x[0] = screen.x + Math.round(TriaHeight * csin);
             y[0] = screen.y - Math.round(TriaHeight * ccos);
@@ -165,5 +166,5 @@
             x[3] = screen.x + Math.round(TriaWidth * csin240);
             y[3] = screen.y - Math.round(TriaWidth * ccos240);
-    
+
             g.drawPolygon(x, y, 4);
         }
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 33045)
@@ -1,2 +1,3 @@
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
@@ -117,16 +118,16 @@
         MainMenu menu = Main.main.menu;
         lgpsmenu = menu.gpsMenu;
-        if (lgpsmenu.getItemCount()>0) {
+        if (lgpsmenu.getItemCount() > 0) {
             lgpsmenu.addSeparator();
         }
-            
+
         JosmAction captureAction = new CaptureAction();
         lgpscapture = new JCheckBoxMenuItem(captureAction);
         lgpsmenu.add(lgpscapture);
         lgpscapture.setAccelerator(captureAction.getShortcut().getKeyStroke());
-        
+
         JosmAction centerAction = new CenterAction();
         MainMenu.add(lgpsmenu, centerAction);
-        
+
         JosmAction autoCenterAction = new AutoCenterAction();
         lgpsautocenter = new JCheckBoxMenuItem(autoCenterAction);
@@ -162,5 +163,5 @@
      */
     public void enableTracking(boolean enable) {
-    
+
         if (enable && !enabled) {
             assert (acquirer == null);
@@ -199,26 +200,26 @@
     }
 
-    /** 
-     * Add a listener for gps events. 
-     * @param listener the listener. 
-     */ 
-    public void addPropertyChangeListener(PropertyChangeListener listener) { 
-        assert(!listenerQueue.contains(listener));
-
-        listenerQueue.add(listener); 
+    /**
+     * Add a listener for gps events.
+     * @param listener the listener.
+     */
+    public void addPropertyChangeListener(PropertyChangeListener listener) {
+        assert !listenerQueue.contains(listener);
+
+        listenerQueue.add(listener);
         if (acquirer != null)
-            acquirer.addPropertyChangeListener(listener); 
-    } 
-
-    /** 
-     * Remove a listener for gps events. 
-     * @param listener the listener. 
-     */ 
-    public void removePropertyChangeListener(PropertyChangeListener listener) { 
-        assert(listenerQueue.contains(listener));
-
-        listenerQueue.remove(listener); 
-        if (acquirer != null) 
-            acquirer.removePropertyChangeListener(listener); 
+            acquirer.addPropertyChangeListener(listener);
+    }
+
+    /**
+     * Remove a listener for gps events.
+     * @param listener the listener.
+     */
+    public void removePropertyChangeListener(PropertyChangeListener listener) {
+        assert listenerQueue.contains(listener);
+
+        listenerQueue.remove(listener);
+        if (acquirer != null)
+            acquirer.removePropertyChangeListener(listener);
     }
 
Index: /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsStatus.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsStatus.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/LiveGpsStatus.java	(revision 33045)
@@ -1,5 +1,3 @@
-/**
- *
- */
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
Index: /applications/editors/josm/plugins/livegps/src/livegps/SingleSegmentGpxTrack.java
===================================================================
--- /applications/editors/josm/plugins/livegps/src/livegps/SingleSegmentGpxTrack.java	(revision 33044)
+++ /applications/editors/josm/plugins/livegps/src/livegps/SingleSegmentGpxTrack.java	(revision 33045)
@@ -1,2 +1,3 @@
+// License: Public Domain. For details, see LICENSE file.
 package livegps;
 
