Ticket #8511: SimplyfyWayParseErrorPatch.diff

File SimplyfyWayParseErrorPatch.diff, 1.0 KB (added by Lesath, 13 years ago)

Patch for the crashing of josm with a wrong locale value

  • SimplifyWayAction.java

     
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.actions;
    33
    4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    5 import static org.openstreetmap.josm.tools.I18n.tr;
    6 import static org.openstreetmap.josm.tools.I18n.trn;
     4import static org.openstreetmap.josm.gui.help.HelpUtil.*;
     5import static org.openstreetmap.josm.tools.I18n.*;
    76
    87import java.awt.event.ActionEvent;
    98import java.awt.event.KeyEvent;
     
    149148     * @param w the way to simplify
    150149     */
    151150    public SequenceCommand simplifyWay(Way w, DataSet ds) {
    152         double threshold = Double.parseDouble(Main.pref.get("simplify-way.max-error", "3"));
     151        double threshold = Main.pref.getDouble("simplify-way.max-error", "3");
    153152        int lower = 0;
    154153        int i = 0;
    155154        List<Node> newNodes = new ArrayList<Node>(w.getNodesCount());