Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r11174 r11181 75 75 } 76 76 } catch (IllegalArgumentException ex) { 77 if (ex.getMessage() == null || ex.getMessage().isEmpty() ) {77 if (ex.getMessage() == null || ex.getMessage().isEmpty() || GraphicsEnvironment.isHeadless()) { 78 78 throw ex; 79 79 } else { -
trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java
r10739 r11181 71 71 public void testActionPerformedDisabled() { 72 72 assertTrue(Main.getLayerManager().getLayersOfType(TMSLayer.class).isEmpty()); 73 new AddImageryLayerAction(new ImageryInfo()).actionPerformed(null); 73 try { 74 new AddImageryLayerAction(new ImageryInfo()).actionPerformed(null); 75 } catch (IllegalArgumentException expected) { 76 assertEquals("Parameter 'info.url' must not be null", expected.getMessage()); 77 } 74 78 assertTrue(Main.getLayerManager().getLayersOfType(TMSLayer.class).isEmpty()); 75 79 }
Note:
See TracChangeset
for help on using the changeset viewer.