Changeset 10373 in josm for trunk/src/org


Ignore:
Timestamp:
2016-06-14T19:26:16+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #12949 - Use test rule instead of JOSMFixture to speed up tests (patch by michael2402) - gsoc-core

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java

    r10369 r10373  
    7979                    ? getWMSLayerInfo() : info;
    8080            if (infoToAdd != null) {
    81                 Main.main.addLayer(ImageryLayer.create(infoToAdd));
     81                Main.getLayerManager().addLayer(ImageryLayer.create(infoToAdd));
    8282                AlignImageryPanel.addNagPanelIfNeeded(infoToAdd);
    8383            }
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r10364 r10373  
    9090        if (api == null) {
    9191            api = new OsmApi(serverUrl);
    92             instances.put(serverUrl, api);
     92            cacheInstance(api);
    9393        }
    9494        return api;
     95    }
     96
     97    protected static void cacheInstance(OsmApi api) {
     98        instances.put(api.getServerUrl(), api);
    9599    }
    96100
Note: See TracChangeset for help on using the changeset viewer.