Ignore:
Timestamp:
2015-05-01T21:47:18+02:00 (9 years ago)
Author:
Don-vip
Message:

simplify URL encoding/decoding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r8285 r8304  
    1111import java.awt.event.KeyEvent;
    1212import java.awt.event.MouseEvent;
    13 import java.io.UnsupportedEncodingException;
    14 import java.net.URLDecoder;
    1513import java.util.Collection;
    1614import java.util.HashMap;
     
    3634import org.openstreetmap.josm.gui.util.TableHelper;
    3735import org.openstreetmap.josm.tools.GBC;
     36import org.openstreetmap.josm.tools.Utils;
    3837
    3938/**
     
    263262                public void run() {
    264263                    String[] tags = null;
    265                     try {
    266                         tags = URLDecoder.decode(args.get("addtags"), "UTF-8").split("\\|");
    267                     } catch (UnsupportedEncodingException e) {
    268                         throw new RuntimeException(e);
    269                     }
     264                    tags = Utils.decodeUrl(args.get("addtags")).split("\\|");
    270265                    Set<String> tagSet = new HashSet<>();
    271266                    for (String tag : tags) {
Note: See TracChangeset for help on using the changeset viewer.