Changeset 18050 in josm


Ignore:
Timestamp:
2021-07-17T17:16:14+02:00 (3 years ago)
Author:
Don-vip
Message:

see #17606 - see #21126 - fixes

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/combinations.mapcss

    r18047 r18050  
    931931  group: tr("missing tag");
    932932  set missing_piste_difficulty;
    933   assertMatch:   "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 0)";
    934   assertNoMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 1)";
    935933  assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
    936934}
     
    940938  group: tr("missing tag");
    941939  set missing_piste_difficulty_both;
    942   assertMatch:   "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 0)";
    943   assertNoMatch: "way piste:type=nordic (count(parent_tag("piste:difficulty")) == 1)";
    944940  assertNoMatch: "way piste:type=nordic piste:difficulty=easy";
    945941}
  • trunk/src/org/openstreetmap/josm/data/ImageData.java

    r18049 r18050  
    317317     * @param img the {@link ImageEntry} to remove
    318318     * @param fireUpdateEvent if {@code true}, notifies listeners of image update
    319      * @since xxx
     319     * @since 18049
    320320     */
    321321    public void removeImage(ImageEntry img, boolean fireUpdateEvent) {
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r15951 r18050  
    169169                : null;
    170170        if (p == null) {
    171             throw new IllegalArgumentException("Expecting n/node/w/way/r/relation/area, but got '" + x[0] + '\'');
     171            throw new IllegalArgumentException(
     172                    "Expecting n/node/w/way/r/relation/area, but got '" + x[0] + "' for assertion '" + assertion + '\'');
    172173        }
    173174        if (x.length > 1) {
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/WikimediaCommonsLoaderTest.java

    r18037 r18050  
    1111import java.util.List;
    1212
     13import org.junit.jupiter.api.BeforeAll;
     14import org.junit.jupiter.api.Test;
    1315import org.openstreetmap.josm.data.Bounds;
    1416import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
     17import org.openstreetmap.josm.tools.Http1Client;
     18import org.openstreetmap.josm.tools.HttpClient;
    1519
    1620import com.github.tomakehurst.wiremock.WireMockServer;
    17 import org.junit.jupiter.api.Test;
    1821
    1922/**
     
    2225@BasicPreferences
    2326class WikimediaCommonsLoaderTest {
     27
     28    @BeforeAll
     29    static void beforeAll() {
     30        HttpClient.setFactory(Http1Client::new);
     31    }
     32
    2433    /**
    2534     * Unit test of {@link WikimediaCommonsLoader}
     
    4554    }
    4655
    47     private WireMockServer mockHttp() {
    48         String xml = "" +
     56    private static WireMockServer mockHttp() {
     57        String xml =
    4958                "<api batchcomplete=\"\">\n" +
    5059                "<query>\n" +
     
    5766        final WireMockServer wireMock = new WireMockServer(options().dynamicPort());
    5867        wireMock.stubFor(get(urlEqualTo("/w/api.php?format=xml&action=query&list=geosearch" +
    59                 "&gsnamespace=6&gslimit=500&gsprop=type|name&gsbbox=48.0|11.0|47.0|12.0"))
     68                "&gsnamespace=6&gslimit=500&gsprop=type%7Cname&gsbbox=48.0%7C11.0%7C47.0%7C12.0"))
    6069                .willReturn(aResponse().withBody(xml)));
    6170        return wireMock;
  • trunk/test/unit/org/openstreetmap/josm/tools/MediawikiTest.java

    r18046 r18050  
    3434        // See https://josm.openstreetmap.de/ticket/21126
    3535        // Checks that URL can be converted to URI, needed for HTTP/2
     36        // CHECKSTYLE.OFF: LineLength
    3637        assertEquals(new URI("https://commons.wikimedia.org/w/api.php?format=xml&action=query&list=geosearch&gsnamespace=6&gslimit=500&gsprop=type%7Cname&gsbbox=48.8623665%7C2.3913497%7C48.8600879%7C2.3967605"),
    37                 new URL(Mediawiki.getGeoImagesUrl("https://commons.wikimedia.org/w/api.php", new Bounds(48.8600879, 2.3913497, 48.8623665, 2.3967605))).toURI());
     38                new URL(Mediawiki.getGeoImagesUrl("https://commons.wikimedia.org/w/api.php",
     39                        new Bounds(48.8600879, 2.3913497, 48.8623665, 2.3967605))).toURI());
     40        // CHECKSTYLE.ON: LineLength
    3841    }
    3942}
Note: See TracChangeset for help on using the changeset viewer.