Ignore:
Timestamp:
2018-04-04T19:47:35+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16145 - remove white spaces from key/values when pasting tags

Location:
trunk/src/org/openstreetmap/josm/data/validation/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r13507 r13597  
    336336                            CheckParameterUtil.ensureThat(val.contains("=>"), "Separate old from new key by '=>'!");
    337337                            final String[] x = val.split("=>", 2);
    338                             check.fixCommands.add(FixCommand.fixChangeKey(Tag.removeWhiteSpaces(x[0]), Tag.removeWhiteSpaces(x[1])));
     338                            check.fixCommands.add(FixCommand.fixChangeKey(Utils.removeWhiteSpaces(x[0]), Utils.removeWhiteSpaces(x[1])));
    339339                        } else if (val != null && "fixDeleteObject".equals(ai.key)) {
    340340                            CheckParameterUtil.ensureThat("this".equals(val), "fixDeleteObject must be followed by 'this'");
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r13584 r13597  
    710710                    commands.add(new ChangePropertyCommand(p, key, null));
    711711                } else if (value.startsWith(" ") || value.endsWith(" ") || value.contains("  ")) {
    712                     commands.add(new ChangePropertyCommand(p, key, Tag.removeWhiteSpaces(value)));
     712                    commands.add(new ChangePropertyCommand(p, key, Utils.removeWhiteSpaces(value)));
    713713                } else if (key.startsWith(" ") || key.endsWith(" ") || key.contains("  ")) {
    714                     commands.add(new ChangePropertyKeyCommand(p, key, Tag.removeWhiteSpaces(key)));
     714                    commands.add(new ChangePropertyKeyCommand(p, key, Utils.removeWhiteSpaces(key)));
    715715                } else {
    716716                    String evalue = Entities.unescape(value);
Note: See TracChangeset for help on using the changeset viewer.