Changeset 14866 in josm for trunk/src/org


Ignore:
Timestamp:
2019-03-09T20:43:09+01:00 (6 years ago)
Author:
GerdP
Message:

fix some sonar issues

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

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

    r14822 r14866  
    6767    }
    6868
    69     protected JPanel buildAboutPanel() {
     69    JPanel buildAboutPanel() {
    7070        final JTabbedPane about = new JTabbedPane();
    7171
  • trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java

    r14862 r14866  
    284284    @Override
    285285    protected void updateEnabledState() {
    286         if (info.isBlacklisted()) {
    287             setEnabled(false);
    288         } else {
    289             setEnabled(true);
    290         }
     286        setEnabled(!info.isBlacklisted());
    291287    }
    292288
  • trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java

    r14624 r14866  
    4444 */
    4545public class ImageryAdjustAction extends MapMode implements AWTEventListener {
    46     private static volatile ImageryOffsetDialog offsetDialog;
    47     private static Cursor cursor = ImageProvider.getCursor("normal", "move");
    48 
    49     private OffsetBookmark old;
    50     private OffsetBookmark tempOffset;
     46    private static ImageryOffsetDialog offsetDialog;
     47
     48    private transient OffsetBookmark old;
     49    private transient OffsetBookmark tempOffset;
    5150    private EastNorth prevEastNorth;
    5251    private transient AbstractTileSourceLayer<?> layer;
     
    6059     */
    6160    public ImageryAdjustAction(AbstractTileSourceLayer<?> layer) {
    62         super(tr("New offset"), "adjustimg", tr("Adjust the position of this imagery layer"), cursor);
     61        super(tr("New offset"), "adjustimg", tr("Adjust the position of this imagery layer"),
     62                ImageProvider.getCursor("normal", "move"));
    6363        putValue("toolbar", Boolean.FALSE);
    6464        this.layer = layer;
     
    118118        restoreOldMode = false;
    119119        doExitMode();
    120     }
    121 
    122     private void exitModeAndRestoreOldMode() {
    123         restoreOldMode = true;
    124         doExitMode();
    125         restoreOldMode = false;
    126120    }
    127121
     
    241235    private static final class ConfirmOverwriteBookmarkDialog extends ExtendedDialog {
    242236        ConfirmOverwriteBookmarkDialog() {
    243             super(MainApplication.getMainFrame(), tr("Overwrite"), new String[] {tr("Overwrite"), tr("Cancel")});
     237            super(MainApplication.getMainFrame(), tr("Overwrite"), tr("Overwrite"), tr("Cancel"));
    244238            contentInsets = new Insets(10, 15, 10, 15);
    245239            setContent(tr("Offset bookmark already exists. Overwrite?"));
     
    381375            }
    382376        }
     377
     378        private void exitModeAndRestoreOldMode() {
     379            restoreOldMode = true;
     380            doExitMode();
     381            restoreOldMode = false;
     382        }
    383383    }
    384384
Note: See TracChangeset for help on using the changeset viewer.