Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetHeaderDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetHeaderDownloadTask.java	(revision 14153)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetHeaderDownloadTask.java	(revision 14154)
@@ -73,5 +73,5 @@
     /**
      * Creates the download task for a collection of changeset ids. Uses a {@link org.openstreetmap.josm.gui.PleaseWaitDialog}
-     * whose parent is {@link Main#parent}.
+     * whose parent is {@link MainApplication#getMainFrame}.
      *
      * Null ids or or ids &lt;= 0 in the id collection are ignored.
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 14153)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 14154)
@@ -66,5 +66,4 @@
 
 import org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.DeleteAction;
 import org.openstreetmap.josm.actions.JosmAction;
@@ -150,6 +149,4 @@
 import org.openstreetmap.josm.spi.lifecycle.Lifecycle;
 import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
-import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
 import org.openstreetmap.josm.tools.FontsManager;
 import org.openstreetmap.josm.tools.GBC;
@@ -175,5 +172,5 @@
  */
 @SuppressWarnings("deprecation")
-public class MainApplication extends Main {
+public class MainApplication extends org.openstreetmap.josm.Main {
 
     /**
@@ -857,10 +854,5 @@
         }
         updateSystemProperties();
-        Preferences.main().addPreferenceChangeListener(new PreferenceChangedListener() {
-            @Override
-            public void preferenceChanged(PreferenceChangeEvent e) {
-                updateSystemProperties();
-            }
-        });
+        Preferences.main().addPreferenceChangeListener(e -> updateSystemProperties());
 
         checkIPv6();
@@ -887,5 +879,5 @@
         }
         mainPanel = mainFrame.getPanel();
-        Main.parent = mainFrame;
+        org.openstreetmap.josm.Main.parent = mainFrame;
 
         if (args.hasOption(Option.LOAD_PREFERENCES)) {
Index: trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 14153)
+++ trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 14154)
@@ -17,5 +17,4 @@
 
 import javax.swing.Icon;
-import javax.swing.JFrame;
 import javax.swing.JMenu;
 import javax.swing.JMenuItem;
@@ -57,5 +56,5 @@
         if (menu != null) {
             // Compute max height of current screen
-            int maxHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame) MainApplication.getMainFrame()).getInsets().top;
+            int maxHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - MainApplication.getMainFrame().getInsets().top;
 
             // Remove top fixed part height
@@ -312,5 +311,5 @@
             }
 
-            int allowedHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame) MainApplication.getMainFrame()).getInsets().top;
+            int allowedHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - MainApplication.getMainFrame().getInsets().top;
 
             boolean mustSCroll = allItemsHeight > allowedHeight;
Index: trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 14153)
+++ trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 14154)
@@ -165,7 +165,6 @@
 
     protected void appendPrimitive(OsmPrimitive p, JsonArrayBuilder array) {
-        if (p.isIncomplete()) {
-            return;
-        } else if (SKIP_EMPTY_NODES.get() && p instanceof Node && p.getKeys().isEmpty()) {
+        if (p.isIncomplete() ||
+            (SKIP_EMPTY_NODES.get() && p instanceof Node && p.getKeys().isEmpty())) {
             return;
         }
Index: trunk/src/org/openstreetmap/josm/spi/lifecycle/package-info.java
===================================================================
--- trunk/src/org/openstreetmap/josm/spi/lifecycle/package-info.java	(revision 14154)
+++ trunk/src/org/openstreetmap/josm/spi/lifecycle/package-info.java	(revision 14154)
@@ -0,0 +1,6 @@
+// License: GPL. For details, see LICENSE file.
+
+/**
+ * Service for JOSM lifecycle.
+ */
+package org.openstreetmap.josm.spi.lifecycle;
