Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java

    r30532 r30737  
    5252 */
    5353public class UploadDataGui extends ExtendedDialog {
    54    
     54
    5555    /**
    5656     * This enum contains the possible values for the visibility field and their
     
    103103
    104104    private boolean canceled = false;
    105    
     105
    106106    public UploadDataGui() {
    107107        // Initalizes ExtendedDialog
     
    113113        JPanel content = initComponents();
    114114        GpxData gpxData = UploadOsmConnection.getInstance().autoSelectTrace();
    115         initTitleAndDescriptionFromGpxData(gpxData);    // this is changing some dialog elements, so it (probably) must be before the following 
     115        initTitleAndDescriptionFromGpxData(gpxData);    // this is changing some dialog elements, so it (probably) must be before the following
    116116        setContent(content);
    117117        setButtonIcons(new String[] { "uploadtrace.png", "cancel.png" });
     
    129129        JLabel visibilityLabel = new JLabel(tr("Visibility"));
    130130        visibilityLabel.setToolTipText(tr("Defines the visibility of your trace for other OSM users."));
    131        
     131
    132132        visibilityCombo = new JComboBox<>();
    133133        visibilityCombo.setEditable(false);
     
    142142        descriptionField = new HistoryComboBox();
    143143        descriptionField.setToolTipText(tr("Please enter Description about your trace."));
    144        
    145         List<String> descHistory = new LinkedList<String>(Main.pref.getCollection("directupload.description.history", new LinkedList<String>()));
     144
     145        List<String> descHistory = new LinkedList<>(Main.pref.getCollection("directupload.description.history", new LinkedList<String>()));
    146146        // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
    147147        // XXX this should be handled in HistoryComboBox
     
    154154        tagsField.setToolTipText(tr("Please enter tags about your trace."));
    155155
    156         List<String> tagsHistory = new LinkedList<String>(Main.pref.getCollection("directupload.tags.history", new LinkedList<String>()));
     156        List<String> tagsHistory = new LinkedList<>(Main.pref.getCollection("directupload.tags.history", new LinkedList<String>()));
    157157        // we have to reverse the history, because ComboBoxHistory will reverse it againin addElement()
    158158        // XXX this should be handled in HistoryComboBox
     
    199199      }
    200200      else {
    201           description = new SimpleDateFormat("yyMMddHHmmss").format(new Date()); 
     201          description = new SimpleDateFormat("yyMMddHHmmss").format(new Date());
    202202          title = tr("No GPX layer selected. Cannot upload a trace.");
    203203      }
     
    296296        c.setRequestMethod("POST");
    297297        c.setDoOutput(true);
    298         // unfortunately, addAuth() is protected, so we need to subclass OsmConnection 
    299         // XXX make addAuth public. 
     298        // unfortunately, addAuth() is protected, so we need to subclass OsmConnection
     299        // XXX make addAuth public.
    300300        UploadOsmConnection.getInstance().addAuthHack(c);
    301301
     
    322322                returnMsg += "\n" + c.getHeaderField("Error");
    323323        }
    324        
     324
    325325        final String returnMsgEDT = returnMsg;
    326326
     
    408408
    409409        final String errorsEDT = errors;
    410        
     410
    411411        GuiHelper.runInEDT(new Runnable() {
    412412            @Override public void run() {
     
    414414            }
    415415        });
    416        
     416
    417417        return errors.length() > 0;
    418418    }
     
    429429        // Disable Upload button so users can't just upload that track again
    430430        buttons.get(0).setEnabled(false);
    431        
     431
    432432        // save history
    433433        Main.pref.put("directupload.visibility.last-used", visibility.desc2visi(visibilityCombo.getSelectedItem().toString()).name());
    434        
     434
    435435        descriptionField.addCurrentItemToHistory();
    436436        Main.pref.putCollection("directupload.description.history", descriptionField.getHistory());
Note: See TracChangeset for help on using the changeset viewer.