Ignore:
Timestamp:
2013-01-29T23:17:19+01:00 (12 years ago)
Author:
donvip
Message:

[josm_reverter] Align plugin to JOSM 5680

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetHandler.java

    r28089 r29216  
    1111    public static final String permissionKey = "remotecontrol.permission.revert_changeset";
    1212    public static final boolean permissionDefault = true;
     13   
     14    private int changesetId;
    1315
    1416    @Override
     
    1719        try
    1820        {
    19             int changesetId = Integer.parseInt(args.get("id"));
    2021            Main.worker.submit(new RevertChangesetTask(changesetId, ChangesetReverter.RevertType.FULL, true));
    2122        } catch (Exception ex) {
     
    4142        return tr("Remote Control has been asked to revert a changeset.");
    4243    }
     44
     45    @Override
     46    protected void validateRequest() throws RequestHandlerBadRequestException {
     47        try {
     48            changesetId = Integer.parseInt(args.get("id"));
     49        } catch (NumberFormatException e) {
     50            throw new RequestHandlerBadRequestException("NumberFormatException: "+e.getMessage());
     51        }
     52    }
    4353}
Note: See TracChangeset for help on using the changeset viewer.