Index: trunk/src/org/openstreetmap/josm/data/coor/conversion/LatLonParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/conversion/LatLonParser.java	(revision 12794)
+++ trunk/src/org/openstreetmap/josm/data/coor/conversion/LatLonParser.java	(revision 12795)
@@ -54,4 +54,8 @@
         private double lat = Double.NaN;
         private double lon = Double.NaN;
+    }
+
+    private LatLonParser() {
+        // private constructor
     }
 
Index: trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 12794)
+++ trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 12795)
@@ -33,7 +33,7 @@
     public static final ProjectionCLI INSTANCE = new ProjectionCLI();
 
-    private boolean argInverse = false;
-    private boolean argSwitchInput = false;
-    private boolean argSwitchOutput = false;
+    private boolean argInverse = false;         // NOPMD
+    private boolean argSwitchInput = false;     // NOPMD
+    private boolean argSwitchOutput = false;    // NOPMD
 
     @Override
@@ -62,4 +62,6 @@
                 argSwitchOutput = true;
                 break;
+            default:
+                // ignore
             }
         }
@@ -127,6 +129,5 @@
                 "    EOF\n"+
                 "       => 1250371.1334500168 6545331.055189664\n" +
-                "          -1.3208998232319113E7 4486401.160664663\n" +
-                "";
+                "          -1.3208998232319113E7 4486401.160664663\n";
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 12794)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 12795)
@@ -978,10 +978,5 @@
         Main.toolbar = toolbar;
         ProjectionPreference.setProjection();
-        NTV2GridShiftFileWrapper.registerNTV2GridShiftFileSource(
-                NTV2GridShiftFileWrapper.NTV2_SOURCE_PRIORITY_LOCAL,
-                NTV2Proj4DirGridShiftFileSource.getInstance());
-        NTV2GridShiftFileWrapper.registerNTV2GridShiftFileSource(
-                NTV2GridShiftFileWrapper.NTV2_SOURCE_PRIORITY_DOWNLOAD,
-                JOSM_WEBSITE_NTV2_SOURCE);
+        setupNadGridSources();
         GuiHelper.translateJavaInternalMessages();
         preConstructorInit();
@@ -1037,4 +1032,17 @@
             RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager());
         }
+    }
+
+    /**
+     * Setup the sources for NTV2 grid shift files for projection support.
+     * @since 12795
+     */
+    public static void setupNadGridSources() {
+        NTV2GridShiftFileWrapper.registerNTV2GridShiftFileSource(
+                NTV2GridShiftFileWrapper.NTV2_SOURCE_PRIORITY_LOCAL,
+                NTV2Proj4DirGridShiftFileSource.getInstance());
+        NTV2GridShiftFileWrapper.registerNTV2GridShiftFileSource(
+                NTV2GridShiftFileWrapper.NTV2_SOURCE_PRIORITY_DOWNLOAD,
+                JOSM_WEBSITE_NTV2_SOURCE);
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 12794)
+++ trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 12795)
@@ -121,4 +121,7 @@
         Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator
 
+        // setup projection grid files
+        MainApplication.setupNadGridSources();
+
         // make sure we don't upload to or test against production
         url = OsmApi.getOsmApi().getBaseUrl().toLowerCase(Locale.ENGLISH).trim();
Index: trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 12794)
+++ trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 12795)
@@ -269,46 +269,3 @@
     }
 
-    /**
-     * Unit test of {@link LatLon#parse} method.
-     */
-    @Test
-    public void testParse() {
-        assertEquals(new LatLon(49.29918, 19.24788), LatLon.parse("49.29918° 19.24788°"));
-        assertEquals(new LatLon(49.29918, 19.24788), LatLon.parse("N 49.29918 E 19.24788°"));
-        assertEquals(new LatLon(49.29918, 19.24788), LatLon.parse("49.29918° 19.24788°"));
-        assertEquals(new LatLon(49.29918, 19.24788), LatLon.parse("N 49.29918 E 19.24788"));
-        assertEquals(new LatLon(49.29918, 19.24788), LatLon.parse("n 49.29918 e 19.24788"));
-        assertEquals(new LatLon(-19 - 24.788 / 60, -49 - 29.918 / 60), LatLon.parse("W 49°29.918' S 19°24.788'"));
-        assertEquals(new LatLon(-19 - 24.788 / 60, -49 - 29.918 / 60), LatLon.parse("w 49°29.918' s 19°24.788'"));
-        assertEquals(new LatLon(49 + 29. / 60 + 04. / 3600, 19 + 24. / 60 + 43. / 3600), LatLon.parse("N 49°29'04\" E 19°24'43\""));
-        assertEquals(new LatLon(49.29918, 19.24788), LatLon.parse("49.29918 N, 19.24788 E"));
-        assertEquals(new LatLon(49.29918, 19.24788), LatLon.parse("49.29918 n, 19.24788 e"));
-        assertEquals(new LatLon(49 + 29. / 60 + 21. / 3600, 19 + 24. / 60 + 38. / 3600), LatLon.parse("49°29'21\" N 19°24'38\" E"));
-        assertEquals(new LatLon(49 + 29. / 60 + 51. / 3600, 19 + 24. / 60 + 18. / 3600), LatLon.parse("49 29 51, 19 24 18"));
-        assertEquals(new LatLon(49 + 29. / 60, 19 + 24. / 60), LatLon.parse("49 29, 19 24"));
-        assertEquals(new LatLon(19 + 24. / 60, 49 + 29. / 60), LatLon.parse("E 49 29, N 19 24"));
-        assertEquals(new LatLon(49 + 29. / 60, 19 + 24. / 60), LatLon.parse("49° 29; 19° 24"));
-        assertEquals(new LatLon(49 + 29. / 60, 19 + 24. / 60), LatLon.parse("49° 29; 19° 24"));
-        assertEquals(new LatLon(49 + 29. / 60, -19 - 24. / 60), LatLon.parse("N 49° 29, W 19° 24"));
-        assertEquals(new LatLon(-49 - 29.5 / 60, 19 + 24.6 / 60), LatLon.parse("49° 29.5 S, 19° 24.6 E"));
-        assertEquals(new LatLon(49 + 29.918 / 60, 19 + 15.88 / 60), LatLon.parse("N 49 29.918 E 19 15.88"));
-        assertEquals(new LatLon(49 + 29.4 / 60, 19 + 24.5 / 60), LatLon.parse("49 29.4 19 24.5"));
-        assertEquals(new LatLon(-49 - 29.4 / 60, 19 + 24.5 / 60), LatLon.parse("-49 29.4 N -19 24.5 W"));
-    }
-
-    /**
-     * Unit test of {@link LatLon#parse} method - invalid case 1.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testParseInvalid1() {
-        LatLon.parse("48°45'S 23°30'S");
-    }
-
-    /**
-     * Unit test of {@link LatLon#parse} method - invalid case 2.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testParseInvalid2() {
-        LatLon.parse("47°45'N 24°00'S");
-    }
 }
Index: trunk/test/unit/org/openstreetmap/josm/data/coor/conversion/LatLonParserTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/coor/conversion/LatLonParserTest.java	(revision 12795)
+++ trunk/test/unit/org/openstreetmap/josm/data/coor/conversion/LatLonParserTest.java	(revision 12795)
@@ -0,0 +1,69 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.coor.conversion;
+
+import static org.junit.Assert.assertEquals;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+/**
+ * Unit tests for class {@link LatLonParser}.
+ */
+public class LatLonParserTest {
+
+    /**
+     * Setup test.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().projection();
+
+    /**
+     * Unit test of {@link LatLonParser#parse} method.
+     */
+    @Test
+    public void testParse() {
+        assertEquals(new LatLon(49.29918, 19.24788), LatLonParser.parse("49.29918° 19.24788°"));
+        assertEquals(new LatLon(49.29918, 19.24788), LatLonParser.parse("N 49.29918 E 19.24788°"));
+        assertEquals(new LatLon(49.29918, 19.24788), LatLonParser.parse("49.29918° 19.24788°"));
+        assertEquals(new LatLon(49.29918, 19.24788), LatLonParser.parse("N 49.29918 E 19.24788"));
+        assertEquals(new LatLon(49.29918, 19.24788), LatLonParser.parse("n 49.29918 e 19.24788"));
+        assertEquals(new LatLon(-19 - 24.788 / 60, -49 - 29.918 / 60), LatLonParser.parse("W 49°29.918' S 19°24.788'"));
+        assertEquals(new LatLon(-19 - 24.788 / 60, -49 - 29.918 / 60), LatLonParser.parse("w 49°29.918' s 19°24.788'"));
+        assertEquals(new LatLon(49 + 29. / 60 + 04. / 3600, 19 + 24. / 60 + 43. / 3600), LatLonParser.parse("N 49°29'04\" E 19°24'43\""));
+        assertEquals(new LatLon(49.29918, 19.24788), LatLonParser.parse("49.29918 N, 19.24788 E"));
+        assertEquals(new LatLon(49.29918, 19.24788), LatLonParser.parse("49.29918 n, 19.24788 e"));
+        assertEquals(new LatLon(49 + 29. / 60 + 21. / 3600, 19 + 24. / 60 + 38. / 3600), LatLonParser.parse("49°29'21\" N 19°24'38\" E"));
+        assertEquals(new LatLon(49 + 29. / 60 + 51. / 3600, 19 + 24. / 60 + 18. / 3600), LatLonParser.parse("49 29 51, 19 24 18"));
+        assertEquals(new LatLon(49 + 29. / 60, 19 + 24. / 60), LatLonParser.parse("49 29, 19 24"));
+        assertEquals(new LatLon(19 + 24. / 60, 49 + 29. / 60), LatLonParser.parse("E 49 29, N 19 24"));
+        assertEquals(new LatLon(49 + 29. / 60, 19 + 24. / 60), LatLonParser.parse("49° 29; 19° 24"));
+        assertEquals(new LatLon(49 + 29. / 60, 19 + 24. / 60), LatLonParser.parse("49° 29; 19° 24"));
+        assertEquals(new LatLon(49 + 29. / 60, -19 - 24. / 60), LatLonParser.parse("N 49° 29, W 19° 24"));
+        assertEquals(new LatLon(-49 - 29.5 / 60, 19 + 24.6 / 60), LatLonParser.parse("49° 29.5 S, 19° 24.6 E"));
+        assertEquals(new LatLon(49 + 29.918 / 60, 19 + 15.88 / 60), LatLonParser.parse("N 49 29.918 E 19 15.88"));
+        assertEquals(new LatLon(49 + 29.4 / 60, 19 + 24.5 / 60), LatLonParser.parse("49 29.4 19 24.5"));
+        assertEquals(new LatLon(-49 - 29.4 / 60, 19 + 24.5 / 60), LatLonParser.parse("-49 29.4 N -19 24.5 W"));
+    }
+
+    /**
+     * Unit test of {@link LatLonParser#parse} method - invalid case 1.
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testParseInvalid1() {
+        LatLonParser.parse("48°45'S 23°30'S");
+    }
+
+    /**
+     * Unit test of {@link LatLonParser#parse} method - invalid case 2.
+     */
+    @Test(expected = IllegalArgumentException.class)
+    public void testParseInvalid2() {
+        LatLonParser.parse("47°45'N 24°00'S");
+    }
+
+}
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 12794)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 12795)
@@ -84,5 +84,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().timeout(30_000);
+    public JOSMTestRules test = new JOSMTestRules().platform().projectionNadGrids().timeout(30_000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 12794)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 12795)
@@ -24,5 +24,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules().projectionNadGrids().platform();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 12794)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 12795)
@@ -55,4 +55,5 @@
     private boolean platform;
     private boolean useProjection;
+    private boolean useProjectionNadGrids;
     private boolean commands;
     private boolean allowMemoryManagerLeaks;
@@ -154,4 +155,13 @@
     public JOSMTestRules projection() {
         useProjection = true;
+        return this;
+    }
+
+    /**
+     * Set up loading of NTV2 grit shift files to support projections that need them.
+     * @return this instance, for easy chaining
+     */
+    public JOSMTestRules projectionNadGrids() {
+        useProjectionNadGrids = true;
         return this;
     }
@@ -313,4 +323,8 @@
         if (useProjection) {
             Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator
+        }
+
+        if (useProjectionNadGrids) {
+            MainApplication.setupNadGridSources();
         }
 
