Ignore:
Timestamp:
2014-04-16T00:54:15+02:00 (10 years ago)
Author:
Don-vip
Message:

sonar - fix various minor issues

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
11 edited

Legend:

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

    r6889 r6986  
    174174
    175175                if (n == null) {
    176                     n = node.isNew() ? tr("node") : ""+ node.getId();
     176                    n = node.isNew() ? tr("node") : Long.toString(node.getId());
    177177                }
    178178                name.append(n);
  • trunk/src/org/openstreetmap/josm/gui/MenuScroller.java

    r6920 r6986  
    566566        UP(9, 1, 9),
    567567        DOWN(1, 9, 1);
    568         final int[] xPoints = {1, 5, 9};
     568        static final int[] xPoints = {1, 5, 9};
    569569        final int[] yPoints;
    570570
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java

    r6572 r6986  
    1414import java.util.Map;
    1515
    16 import javax.swing.Action;
    17 import javax.swing.Icon;
    1816import javax.swing.JLabel;
    1917import javax.swing.JPanel;
     
    2725public class PresetListPanel extends JPanel {
    2826
     27    /**
     28     * Constructs a new {@code PresetListPanel}.
     29     */
    2930    public PresetListPanel() {
    3031        super(new GridBagLayout());
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r6890 r6986  
    8181 * Class that helps PropertiesDialog add and edit tag values
    8282 */
    83  class TagEditHelper {
     83class TagEditHelper {
    8484    private final DefaultTableModel tagData;
    8585    private final Map<String, Map<String, Integer>> valueCount;
     
    769769        }
    770770    }
    771  }
     771}
  • trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java

    r6362 r6986  
    4242    }
    4343
    44     private static abstract class JumpToMarker extends AbstractAction implements MultikeyShortcutAction {
     44    private abstract static class JumpToMarker extends AbstractAction implements MultikeyShortcutAction {
    4545
    4646        private final Layer layer;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java

    r6883 r6986  
    246246        "exifCoor = "+exifCoor+" | "+
    247247        (tmp == null ? " tmp==null" :
    248             " [tmp] pos = "+tmp.pos+"");
     248            " [tmp] pos = "+tmp.pos);
    249249        return result;
    250250    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java

    r6889 r6986  
    197197            } else if (val instanceof Color) {
    198198                res.append(Utils.toString((Color)val));
    199             } else {
    200                 res.append(val+"");
     199            } else if (val != null) {
     200                res.append(val.toString());
    201201            }
    202202            res.append("; ");
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r6970 r6986  
    7979        REGEX, NREGEX, ONE_OF, BEGINS_WITH, ENDS_WITH, CONTAINS;
    8080
    81         private static Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX);
     81        private static final Set<Op> NEGATED_OPS = EnumSet.of(NEQ, NREGEX);
    8282
    8383        public boolean eval(String testString, String prototypeString) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java

    r6883 r6986  
    3838    }
    3939
    40     public boolean check(OsmPrimitive primitive)
    41     {
     40    public boolean check(OsmPrimitive primitive) {
    4241        if(conditions == null)
    4342            return true;
    44         for(XmlCondition r : conditions)
    45         {
     43        for(XmlCondition r : conditions) {
    4644            String k = primitive.get(r.key);
    4745
     
    5654        return true;
    5755    }
    58 
    5956}
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r6830 r6986  
    836836     * Base class for the nodes that model a MultiSplitLayout.
    837837     */
    838     public static abstract class Node {
     838    public abstract static class Node {
    839839        private Split parent = null;
    840840        private Rectangle bounds = new Rectangle();
     
    11071107            sb.append(" \"");
    11081108            sb.append(getName());
    1109             sb.append("\"");
     1109            sb.append('\"');
    11101110            sb.append(" weight=");
    11111111            sb.append(getWeight());
    1112             sb.append(" ");
     1112            sb.append(' ');
    11131113            sb.append(getBounds());
    11141114            return sb.toString();
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java

    r6340 r6986  
    145145     * @see #setDividerPainter
    146146     */
    147     public static abstract class DividerPainter {
     147    public abstract static class DividerPainter {
    148148        /**
    149149         * Paint a single Divider.
Note: See TracChangeset for help on using the changeset viewer.