Changeset 8130 in josm for trunk


Ignore:
Timestamp:
2015-03-09T08:46:22+01:00 (5 years ago)
Author:
Don-vip
Message:

fix Sonar issue squid:ModifiersOrderCheck - Modifiers should be declared in the correct order

Location:
trunk/src/org/openstreetmap/josm
Files:
7 edited

Legend:

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

    r7817 r8130  
    179179     * @since 7636
    180180     */
    181     public static abstract class AbstractInternalTask extends PleaseWaitRunnable {
     181    public abstract static class AbstractInternalTask extends PleaseWaitRunnable {
    182182
    183183        protected final boolean newLayer;
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

    r7434 r8130  
    3131    private final List<ImageryInfo> layers = new ArrayList<>();
    3232    private final Map<String, ImageryInfo> layerIds = new HashMap<>();
    33     private final static List<ImageryInfo> defaultLayers = new ArrayList<>();
    34     private final static Map<String, ImageryInfo> defaultLayerIds = new HashMap<>();
     33    private static final List<ImageryInfo> defaultLayers = new ArrayList<>();
     34    private static final Map<String, ImageryInfo> defaultLayerIds = new HashMap<>();
    3535
    3636    private static final String[] DEFAULT_LAYER_SITES = {
  • trunk/src/org/openstreetmap/josm/data/osm/Changeset.java

    r7995 r8130  
    1818 * Represents a single changeset in JOSM. For now its only used during
    1919 * upload but in the future we may do more.
    20  *
     20 * @since 625
    2121 */
    2222public final class Changeset implements Tagged {
     
    349349     * @since 7704
    350350     */
    351     public synchronized final List<ChangesetDiscussionComment> getDiscussion() {
     351    public final synchronized List<ChangesetDiscussionComment> getDiscussion() {
    352352        if (discussion == null) {
    353353            return Collections.emptyList();
     
    361361     * @since 7704
    362362     */
    363     public synchronized final void addDiscussionComment(ChangesetDiscussionComment comment) {
     363    public final synchronized void addDiscussionComment(ChangesetDiscussionComment comment) {
    364364        if (comment == null) {
    365365            return;
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r7937 r8130  
    7777    public static class GroupedMapCSSRule {
    7878        /** MapCSS selectors **/
    79         final public List<Selector> selectors;
     79        public final List<Selector> selectors;
    8080        /** MapCSS declaration **/
    81         final public Declaration declaration;
     81        public final Declaration declaration;
    8282
    8383        /**
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r8087 r8130  
    8383     * stack trace.
    8484     */
    85     public final static ReadWriteLock STYLE_SOURCE_LOCK = new ReentrantReadWriteLock();
     85    public static final ReadWriteLock STYLE_SOURCE_LOCK = new ReentrantReadWriteLock();
    8686
    8787    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/PresetLabel.java

    r7937 r8130  
    22package org.openstreetmap.josm.gui.tagging;
    33
    4 import javax.swing.JLabel;
    54import java.awt.Cursor;
    65import java.awt.Font;
     
    109import java.util.Collections;
    1110
     11import javax.swing.JLabel;
     12
    1213public class PresetLabel extends JLabel {
    1314
    1415    protected final TaggingPreset t;
    1516
     17    /**
     18     * Constructs a new {@code PresetLabel}.
     19     * @param t the tagging preset
     20     */
    1621    public PresetLabel(TaggingPreset t) {
    1722        super(t.getName() + " …");
     
    2631     */
    2732    public static class PresetLabelMouseListener implements MouseListener {
    28         final protected JLabel label;
    29         final protected Font hover;
    30         final protected Font normal;
     33        protected final JLabel label;
     34        protected final Font hover;
     35        protected final Font normal;
    3136
     37        /**
     38         * Constructs a new {@code PresetLabelMouseListener}.
     39         * @param lbl Label to highlight
     40         */
    3241        public PresetLabelMouseListener(JLabel lbl) {
    3342            label = lbl;
     
    3645            hover = normal.deriveFont(Collections.singletonMap(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_DOTTED));
    3746        }
     47
    3848        @Override
    39         public void mouseClicked(MouseEvent arg0) {
     49        public void mouseClicked(MouseEvent e) {
     50            // Do nothing
    4051        }
    4152
    4253        @Override
    43         public void mouseEntered(MouseEvent arg0) {
     54        public void mouseEntered(MouseEvent e) {
    4455            label.setFont(hover);
    4556        }
     57
    4658        @Override
    47         public void mouseExited(MouseEvent arg0) {
     59        public void mouseExited(MouseEvent e) {
    4860            label.setFont(normal);
    4961        }
     62
    5063        @Override
    51         public void mousePressed(MouseEvent arg0) {}
     64        public void mousePressed(MouseEvent e) {
     65            // Do nothing
     66        }
     67
    5268        @Override
    53         public void mouseReleased(MouseEvent arg0) {}
     69        public void mouseReleased(MouseEvent e) {
     70            // Do nothing
     71        }
    5472    }
    5573}
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java

    r7725 r8130  
    3737    public static final AutoCompletionItemPriority UNKNOWN = new AutoCompletionItemPriority(false, false, false);
    3838
    39     private final static int NO_USER_INPUT = Integer.MAX_VALUE;
     39    private static final int NO_USER_INPUT = Integer.MAX_VALUE;
    4040
    4141    private final int userInput;
     
    4343    private final boolean inStandard;
    4444    private final boolean selected;
    45    
     45
    4646
    4747    /**
    4848     * Create new AutoCompletionItemPriority object.
    49      * 
     49     *
    5050     * @param inDataSet true, if the item is found in the currently active data layer
    5151     * @param inStandard true, if the item is a standard tag, e.g. from the presets.
     
    8181        return userInput == NO_USER_INPUT ? null : userInput;
    8282    }
    83    
     83
    8484    /**
    8585     * Imposes an ordering on the priorities.
     
    115115    }
    116116
    117     @Override public String toString() {
    118         return String.format("<Priority; userInput: %s, inDataSet: %b, inStandard: %b, selected: %b>",
     117    @Override
     118    public String toString() {
     119        return String.format("<Priority; userInput: %s, inDataSet: %b, inStandard: %b, selected: %b>",
    119120                userInput == NO_USER_INPUT ? "no" : Integer.toString(userInput), inDataSet, inStandard, selected);
    120121    }
Note: See TracChangeset for help on using the changeset viewer.