Index: /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 14434)
+++ /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 14435)
@@ -29,4 +29,5 @@
 public class ProjectionCLI implements CLIModule {
 
+    /** The unique instance **/
     public static final ProjectionCLI INSTANCE = new ProjectionCLI();
 
@@ -43,5 +44,5 @@
     public void processArguments(String[] argArray) {
         List<String> positionalArguments = new OptionParser("JOSM projection")
-            .addFlagParameter("help", this::showHelp)
+            .addFlagParameter("help", ProjectionCLI::showHelp)
             .addShortAlias("help", "h")
             .addFlagParameter("inverse", () -> argInverse = true)
@@ -84,5 +85,5 @@
      * Displays help on the console
      */
-    private void showHelp() {
+    private static void showHelp() {
         System.out.println(getHelp());
         System.exit(0);
Index: /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 14434)
+++ /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 14435)
@@ -676,7 +676,5 @@
             });
 
-            addPropertyChangeListener(DIVIDER_LOCATION_PROPERTY, e -> {
-                heightAdjustedExplicitly = true;
-            });
+            addPropertyChangeListener(DIVIDER_LOCATION_PROPERTY, e -> heightAdjustedExplicitly = true);
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 14434)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 14435)
@@ -1776,4 +1776,5 @@
 
         /**
+         * Constructs a new {@code PrecacheTask}.
          * @param progressMonitor that will be notified about progess of the task
          * @param bufferY buffer Y in degrees around which to download tiles
Index: /trunk/src/org/openstreetmap/josm/tools/OptionParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/OptionParser.java	(revision 14434)
+++ /trunk/src/org/openstreetmap/josm/tools/OptionParser.java	(revision 14435)
@@ -168,5 +168,5 @@
                         parameter = split[1];
                     } else {
-                        if (toHandle.isEmpty() || toHandle.getFirst().equals("--")) {
+                        if (toHandle.isEmpty() || "--".equals(toHandle.getFirst())) {
                             throw new OptionParseException(tr("{0}: option ''{1}'' requires an argument", program));
                         }
@@ -198,16 +198,16 @@
                 option.option.runFor(option.parameter);
             } catch (OptionParseException e) {
-                String message;
+                StringBuilder message = new StringBuilder();
                 // Just add a nicer error message
                 if (option.parameter == null) {
-                    message = tr("{0}: Error while handling option ''{1}''", program, option.optionName);
+                    message.append(tr("{0}: Error while handling option ''{1}''", program, option.optionName));
                 } else {
-                    message = tr("{0}: Invalid value {2} for option ''{1}''", program, option.optionName,
-                            option.parameter);
+                    message.append(tr("{0}: Invalid value {2} for option ''{1}''", program, option.optionName,
+                            option.parameter));
                 }
                 if (!e.getLocalizedMessage().isEmpty()) {
-                    message += ": " + e.getLocalizedMessage().isEmpty();
+                    message.append(": ").append(e.getLocalizedMessage().isEmpty());
                 }
-                throw new OptionParseException(message, e);
+                throw new OptionParseException(message.toString(), e);
             }
         }
@@ -261,11 +261,19 @@
     }
 
-    protected abstract static class AvailableOption {
-
-        public boolean requiresParameter() {
+    protected interface AvailableOption {
+
+        /**
+         * Determines if this option requires a parameter.
+         * @return {@code true} if this option requires a parameter ({@code false} by default)
+         */
+        default boolean requiresParameter() {
             return false;
         }
 
-        public OptionCount getRequiredCount() {
+        /**
+         * Determines how often this option may / must be specified on the command line.
+         * @return how often this option may / must be specified on the command line
+         */
+        default OptionCount getRequiredCount() {
             return OptionCount.OPTIONAL;
         }
@@ -275,6 +283,5 @@
          * @param parameter The parameter if {@link #requiresParameter()} is true, <code>null</code> otherwise.
          */
-        public abstract void runFor(String parameter);
-
+        void runFor(String parameter);
     }
 
@@ -292,4 +299,5 @@
 
     /**
+     * Exception thrown when an option cannot be parsed.
      * @author Michael Zangl
      */
@@ -307,4 +315,5 @@
 
         /**
+         * Create an error with a localized description
          * @param localizedMessage The message to display to the user.
          */
@@ -315,4 +324,5 @@
 
         /**
+         * Create an error with a localized description and a root cause
          * @param localizedMessage The message to display to the user.
          * @param t The error that caused this message to be displayed.
Index: /trunk/test/unit/org/openstreetmap/josm/tools/OptionParserTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/OptionParserTest.java	(revision 14434)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/OptionParserTest.java	(revision 14435)
@@ -3,4 +3,6 @@
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
@@ -20,5 +22,5 @@
 public class OptionParserTest {
 
-    // A reason for moving to jupter...
+    // A reason for moving to jupiter...
     @Test(expected = OptionParseException.class)
     public void testEmptyParserRejectsLongopt() {
@@ -43,5 +45,5 @@
 
     @Test
-    public void testparserOption() {
+    public void testParserOption() {
         AtomicReference<String> argFound = new AtomicReference<>();
         OptionParser parser = new OptionParser("test")
@@ -53,5 +55,5 @@
 
     @Test(expected = OptionParseException.class)
-    public void testparserOptionFailsIfMissing() {
+    public void testParserOptionFailsIfMissing() {
         AtomicReference<String> argFound = new AtomicReference<>();
         OptionParser parser = new OptionParser("test")
@@ -62,5 +64,5 @@
 
     @Test(expected = OptionParseException.class)
-    public void testparserOptionFailsIfMissingArgument() {
+    public void testParserOptionFailsIfMissingArgument() {
         AtomicReference<String> argFound = new AtomicReference<>();
         OptionParser parser = new OptionParser("test")
@@ -71,5 +73,5 @@
 
     @Test(expected = OptionParseException.class)
-    public void testparserOptionFailsIfMissing2() {
+    public void testParserOptionFailsIfMissing2() {
         AtomicReference<String> argFound = new AtomicReference<>();
         OptionParser parser = new OptionParser("test")
@@ -80,5 +82,5 @@
 
     @Test(expected = OptionParseException.class)
-    public void testparserOptionFailsIfTwice() {
+    public void testParserOptionFailsIfTwice() {
         AtomicReference<String> argFound = new AtomicReference<>();
         OptionParser parser = new OptionParser("test")
@@ -89,5 +91,5 @@
 
     @Test(expected = OptionParseException.class)
-    public void testparserOptionFailsIfTwiceForAlias() {
+    public void testParserOptionFailsIfTwiceForAlias() {
         AtomicReference<String> argFound = new AtomicReference<>();
         OptionParser parser = new OptionParser("test")
@@ -226,6 +228,6 @@
         assertEquals("arg", argFound.get());
         assertEquals(Arrays.asList("m1", "m2"), multiFound);
-        assertEquals(true, usedFlag.get());
-        assertEquals(false, unusedFlag.get());
+        assertTrue(usedFlag.get());
+        assertFalse(unusedFlag.get());
     }
 
@@ -245,10 +247,10 @@
         assertEquals(Arrays.asList(), remaining);
         assertEquals("arg", argFound.get());
-        assertEquals(true, usedFlag.get());
-        assertEquals(false, unusedFlag.get());
-    }
-
-    @Test(expected = OptionParseException.class)
-    public void testAbigiousAlternatives() {
+        assertTrue(usedFlag.get());
+        assertFalse(unusedFlag.get());
+    }
+
+    @Test(expected = OptionParseException.class)
+    public void testAmbiguousAlternatives() {
         AtomicReference<String> argFound = new AtomicReference<>();
         AtomicBoolean usedFlag = new AtomicBoolean();
@@ -280,6 +282,6 @@
         assertEquals(Arrays.asList("x"), remaining);
         assertEquals("arg", argFound.get());
-        assertEquals(true, usedFlag.get());
-        assertEquals(false, unusedFlag.get());
+        assertTrue(usedFlag.get());
+        assertFalse(unusedFlag.get());
 
         remaining = parser.parseOptions(Arrays.asList("-ft", "arg", "x"));
@@ -287,6 +289,6 @@
         assertEquals(Arrays.asList("x"), remaining);
         assertEquals("arg", argFound.get());
-        assertEquals(true, usedFlag.get());
-        assertEquals(false, unusedFlag.get());
+        assertTrue(usedFlag.get());
+        assertFalse(unusedFlag.get());
 
         remaining = parser.parseOptions(Arrays.asList("-f", "-t=arg", "x"));
@@ -294,6 +296,6 @@
         assertEquals(Arrays.asList("x"), remaining);
         assertEquals("arg", argFound.get());
-        assertEquals(true, usedFlag.get());
-        assertEquals(false, unusedFlag.get());
+        assertTrue(usedFlag.get());
+        assertFalse(unusedFlag.get());
     }
 
@@ -319,10 +321,10 @@
 
     @Test(expected = IllegalArgumentException.class)
-    public void testDupplicateOptionName() {
+    public void testDuplicateOptionName() {
         new OptionParser("test").addFlagParameter("test", this::nop).addFlagParameter("test", this::nop);
     }
 
     @Test(expected = IllegalArgumentException.class)
-    public void testDupplicateOptionName2() {
+    public void testDuplicateOptionName2() {
         new OptionParser("test").addFlagParameter("test", this::nop)
             .addArgumentParameter("test", OptionCount.OPTIONAL, this::nop);
@@ -345,5 +347,5 @@
 
     @Test(expected = IllegalArgumentException.class)
-    public void testDupplicateShortAlias() {
+    public void testDuplicateShortAlias() {
         new OptionParser("test").addFlagParameter("test", this::nop)
         .addFlagParameter("test2", this::nop)
