Changeset 17332 in josm for trunk/scripts


Ignore:
Timestamp:
2020-11-23T16:01:19+01:00 (5 years ago)
Author:
Don-vip
Message:

fix #20131 - fix unit tests and codestyle violations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorLayerIndex.java

    r17329 r17332  
    541541    // catch reordered arguments and switches to WMS version 1.3.0
    542542    String unifyWMS(String url) {
    543         String x[] = url.replaceAll("(?i)VERSION=[0-9.]+", "VERSION=x").replaceAll("(?i)SRS=", "CRS=").split("\\?");
    544         String a[] = x[1].split("&");
     543        String[] x = url.replaceAll("(?i)VERSION=[0-9.]+", "VERSION=x").replaceAll("(?i)SRS=", "CRS=").split("\\?");
     544        String[] a = x[1].split("&");
    545545        Arrays.sort(a);
    546         url = x[0]+"?"+String.join("&",a);
     546        url = x[0]+"?"+String.join("&", a);
    547547        return url;
    548548    }
     
    579579
    580580                        if (ide.equals(idj) && Objects.equals(getType(j), getType(e))) {
    581                             if(getType(j).equals("wms") && unifyWMS(urle).equals(unifyWMS(urlj))) {
     581                            if (getType(j).equals("wms") && unifyWMS(urle).equals(unifyWMS(urlj))) {
    582582                                myprintln("# WMS-URL for id "+idj+" modified: "+getDescription(j));
    583583                            } else {
     
    591591                            break;
    592592                        }
    593                         Collection<String> old = ((ImageryInfo)j).getOldIds();
    594                         if(old != null) {
     593                        Collection<String> old = j.getOldIds();
     594                        if (old != null) {
    595595                            for (String oidj : old) {
    596596                                if (ide.equals(oidj) && Objects.equals(getType(j), getType(e))) {
    597                                     if(getType(j).equals("wms") && unifyWMS(urle).equals(unifyWMS(urlj))) {
     597                                    if (getType(j).equals("wms") && unifyWMS(urle).equals(unifyWMS(urlj))) {
    598598                                        myprintln("# WMS-URL for oldid "+idj+" modified: "+getDescription(j));
    599599                                    } else {
Note: See TracChangeset for help on using the changeset viewer.