Ignore:
Timestamp:
2009-09-07T00:01:31+02:00 (17 years ago)
Author:
Gubaer
Message:

fixed #3422: Upload dialog allows modification of the created_by=* tag when adding to an existing changeset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r2065 r2074  
    1919import java.util.List;
    2020import java.util.Map;
     21import java.util.Properties;
    2122import java.util.logging.Logger;
    2223import java.util.regex.Matcher;
     
    246247        );
    247248        switch(ret) {
    248         case JOptionPane.CLOSED_OPTION: return;
    249         case JOptionPane.CANCEL_OPTION: return;
    250         case 0: synchronizePrimitive(id); break;
    251         case 1: synchronizeDataSet(); break;
    252         default:
    253             // should not happen
    254             throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
     249            case JOptionPane.CLOSED_OPTION: return;
     250            case JOptionPane.CANCEL_OPTION: return;
     251            case 0: synchronizePrimitive(id); break;
     252            case 1: synchronizeDataSet(); break;
     253            default:
     254                // should not happen
     255                throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
    255256        }
    256257    }
     
    286287        );
    287288        switch(ret) {
    288         case JOptionPane.CLOSED_OPTION: return;
    289         case 1: return;
    290         case 0: synchronizeDataSet(); break;
    291         default:
    292             // should not happen
    293             throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
     289            case JOptionPane.CLOSED_OPTION: return;
     290            case 1: return;
     291            case 0: synchronizeDataSet(); break;
     292            default:
     293                // should not happen
     294                throw new IllegalStateException(tr("unexpected return value. Got {0}", ret));
    294295        }
    295296    }
     
    936937                southTabbedPane.setTitleAt(1, tr("Tags of new changeset"));
    937938                Changeset cs = new Changeset();
     939                Properties sysProp = System.getProperties();
     940                Object ua = sysProp.get("http.agent");
     941                cs.put("created_by", (ua == null) ? "JOSM" : ua.toString());
    938942                tagEditorPanel.getModel().initFromPrimitive(cs);
    939943            } else {
Note: See TracChangeset for help on using the changeset viewer.