Ignore:
Timestamp:
2016-01-29T21:47:58+01:00 (8 years ago)
Author:
Don-vip
Message:

code style (checkstyle, sonar)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java

    r9670 r9674  
    284284     */
    285285    public FileChooserManager doCreateFileChooser() {
    286         File file = new File(curDir);
     286        File f = new File(curDir);
    287287        // Use native dialog is preference is set, unless an unsupported selection mode is specifically wanted
    288288        if (PROP_USE_NATIVE_FILE_DIALOG.get() && NativeFileChooser.supportsSelectionMode(selectionMode)) {
    289             fc = new NativeFileChooser(file);
     289            fc = new NativeFileChooser(f);
    290290        } else {
    291             fc = new SwingFileChooser(file);
     291            fc = new SwingFileChooser(f);
    292292        }
    293293
     
    332332     */
    333333    public AbstractFileChooser openFileChooser(Component parent) {
    334         if (fc == null) doCreateFileChooser();
     334        if (fc == null)
     335            doCreateFileChooser();
    335336
    336337        if (parent == null) {
     
    347348        }
    348349
    349         if (!open) {
    350             File file = fc.getSelectedFile();
    351             if (!SaveActionBase.confirmOverwrite(file)) {
    352                 return null;
    353             }
     350        if (!open && !SaveActionBase.confirmOverwrite(fc.getSelectedFile())) {
     351            return null;
    354352        }
    355353        return fc;
     
    357355
    358356    /**
    359      * Opens the file chooser dialog, then checks if filename has the given extension. If not, adds the extension and asks for overwrite if filename exists.
     357     * Opens the file chooser dialog, then checks if filename has the given extension.
     358     * If not, adds the extension and asks for overwrite if filename exists.
    360359     *
    361360     * @return the {@code File} or {@code null} if the user cancelled the dialog.
Note: See TracChangeset for help on using the changeset viewer.