Changeset 17454 in josm


Ignore:
Timestamp:
2021-01-11T00:39:15+01:00 (3 years ago)
Author:
Don-vip
Message:

filter empty WMS params

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorLayerIndex.java

    r17453 r17454  
    555555                        .replaceAll("(?i)HEIGHT=", "HEIGHT=")
    556556                        .split("\\?");
    557         String[] a = x[1].split("&");
    558         Arrays.sort(a);
    559         url = x[0]+"?"+String.join("&", a);
    560         return url;
     557        return x[0] +"?" + Arrays.stream(x[1].split("&"))
     558                                 .filter(s -> !s.endsWith("=")) // filter empty params
     559                                 .sorted()
     560                                 .collect(Collectors.joining("&"));
    561561    }
    562562
Note: See TracChangeset for help on using the changeset viewer.