Changeset 6883 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2014-02-25T01:31:24+01:00 (10 years ago)
Author:
Don-vip
Message:

fix some Sonar issues

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

Legend:

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

    r6852 r6883  
    106106 * @since 98
    107107 */
    108 abstract public class Main {
     108public abstract class Main {
    109109
    110110    /**
     
    126126     * @return <code>true</code> if JOSM currently displays a map view
    127127     */
    128     static public boolean isDisplayingMapView() {
     128    public static boolean isDisplayingMapView() {
    129129        if (map == null) return false;
    130130        if (map.mapView == null) return false;
     
    152152     * and sequential.
    153153     */
    154     public final static ExecutorService worker = new ProgressMonitorExecutor();
     154    public static final ExecutorService worker = new ProgressMonitorExecutor();
    155155
    156156    /**
  • trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java

    r6830 r6883  
    2525public class DownloadReferrersAction extends JosmAction {
    2626
    27         /**
    28         * Constructs a new {@code DownloadReferrersAction}.
    29         */
     27    /**
     28    * Constructs a new {@code DownloadReferrersAction}.
     29    */
    3030    public DownloadReferrersAction() {
    3131        super(tr("Download parent ways/relations..."), "download",
    32                         tr("Download objects referring to one of the selected objects"),
     32                tr("Download objects referring to one of the selected objects"),
    3333                Shortcut.registerShortcut("file:downloadreferrers",
    34                                 tr("File: {0}", tr("Download parent ways/relations...")), KeyEvent.VK_D, Shortcut.ALT_CTRL),
     34                        tr("File: {0}", tr("Download parent ways/relations...")), KeyEvent.VK_D, Shortcut.ALT_CTRL),
    3535                true, "downloadreferrers", true);
    3636        putValue("help", ht("/Action/DownloadParentWaysAndRelation"));
  • trunk/src/org/openstreetmap/josm/actions/audio/AudioFastSlowAction.java

    r6380 r6883  
    1313 * @since 563
    1414 */
    15 abstract public class AudioFastSlowAction extends JosmAction {
     15public abstract class AudioFastSlowAction extends JosmAction {
    1616
    1717    private double multiplier;
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r6848 r6883  
    208208     * Base class for all search operators.
    209209     */
    210     abstract public static class Match implements Predicate<OsmPrimitive> {
    211 
    212         abstract public boolean match(OsmPrimitive osm);
     210    public abstract static class Match implements Predicate<OsmPrimitive> {
     211
     212        public abstract boolean match(OsmPrimitive osm);
    213213
    214214        /**
     
    243243     * A unary search operator which may take data parameters.
    244244     */
    245     abstract public static class UnaryMatch extends Match {
     245    public abstract static class UnaryMatch extends Match {
    246246
    247247        protected final Match match;
     
    265265     * A binary search operator which may take data parameters.
    266266     */
    267     abstract public static class BinaryMatch extends Match {
     267    public abstract static class BinaryMatch extends Match {
    268268
    269269        protected final Match lhs;
  • trunk/src/org/openstreetmap/josm/command/Command.java

    r6881 r6883  
    3636 * @author imi
    3737 */
    38 abstract public class Command extends PseudoCommand {
     38public abstract class Command extends PseudoCommand {
    3939
    4040    private static final class CloneVisitor extends AbstractVisitor {
     
    171171     * @param added The added primitives
    172172     */
    173     abstract public void fillModifiedData(Collection<OsmPrimitive> modified,
     173    public abstract void fillModifiedData(Collection<OsmPrimitive> modified,
    174174            Collection<OsmPrimitive> deleted,
    175175            Collection<OsmPrimitive> added);
  • trunk/src/org/openstreetmap/josm/command/PseudoCommand.java

    r5926 r6883  
    1313 * executed or undone.
    1414 */
    15 abstract public class PseudoCommand {
     15public abstract class PseudoCommand {
     16
    1617    /**
    1718     * Provides a description text representing this command.
    1819     */
    19     abstract public String getDescriptionText();
     20    public abstract String getDescriptionText();
    2021
    2122    /**
     
    2930     * Return the primitives that take part in this command.
    3031     */
    31     abstract public Collection<? extends OsmPrimitive> getParticipatingPrimitives();
     32    public abstract Collection<? extends OsmPrimitive> getParticipatingPrimitives();
    3233
    3334    /**
  • trunk/src/org/openstreetmap/josm/command/PurgeCommand.java

    r6113 r6883  
    4242    protected final ConflictCollection purgedConflicts = new ConflictCollection();
    4343
    44     final protected DataSet ds;
     44    protected final DataSet ds;
    4545
    4646    /**
  • trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java

    r6084 r6883  
    99import javax.swing.table.AbstractTableModel;
    1010
    11 public abstract class CorrectionTableModel<C extends Correction> extends
    12         AbstractTableModel {
     11public abstract class CorrectionTableModel<C extends Correction> extends AbstractTableModel {
    1312
    1413    private List<C> corrections;
     
    1716
    1817    public CorrectionTableModel(List<C> corrections) {
    19         super();
    2018        this.corrections = corrections;
    2119        apply = new boolean[this.corrections.size()];
     
    2523
    2624    @Override
    27     abstract public int getColumnCount();
     25    public abstract int getColumnCount();
    2826
    29     abstract protected boolean isBoldCell(int row, int column);
    30     abstract public String getCorrectionColumnName(int colIndex);
    31     abstract public Object getCorrectionValueAt(int rowIndex, int colIndex);
     27    protected abstract boolean isBoldCell(int row, int column);
     28    public abstract String getCorrectionColumnName(int colIndex);
     29    public abstract Object getCorrectionValueAt(int rowIndex, int colIndex);
    3230
    3331    public List<C> getCorrections() {
  • trunk/src/org/openstreetmap/josm/data/coor/CoordinateFormat.java

    r3530 r6883  
    5656     * @return the default coordinate format
    5757     */
    58     static public CoordinateFormat getDefaultFormat() {
     58    public static CoordinateFormat getDefaultFormat() {
    5959        return defaultCoordinateFormat;
    6060    }
     
    6565     * @param format the default coordinate format
    6666     */
    67     static public void setCoordinateFormat(CoordinateFormat format) {
     67    public static void setCoordinateFormat(CoordinateFormat format) {
    6868        if (format != null) {
    6969            defaultCoordinateFormat = format;
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r6830 r6883  
    191191    }
    192192
    193     public final static String SOUTH = trc("compass", "S");
    194     public final static String NORTH = trc("compass", "N");
     193    public static final String SOUTH = trc("compass", "S");
     194    public static final String NORTH = trc("compass", "N");
    195195    public String latToString(CoordinateFormat d) {
    196196        switch(d) {
     
    211211    }
    212212
    213     public final static String WEST = trc("compass", "W");
    214     public final static String EAST = trc("compass", "E");
     213    public static final String WEST = trc("compass", "W");
     214    public static final String EAST = trc("compass", "E");
    215215    public String lonToString(CoordinateFormat d) {
    216216        switch(d) {
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

    r6642 r6883  
    2525    static List<ImageryInfo> defaultLayers = new ArrayList<ImageryInfo>();
    2626
    27     private final static String[] DEFAULT_LAYER_SITES = {
     27    private static final String[] DEFAULT_LAYER_SITES = {
    2828        Main.JOSM_WEBSITE+"/maps"
    2929    };
  • trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java

    r6847 r6883  
    2424     * The default JOSM OAuth consumer key (created by user josmeditor).
    2525     */
    26     static public final String DEFAULT_JOSM_CONSUMER_KEY = "F7zPYlVCqE2BUH9Hr4SsWZSOnrKjpug1EgqkbsSb";
     26    public static final String DEFAULT_JOSM_CONSUMER_KEY = "F7zPYlVCqE2BUH9Hr4SsWZSOnrKjpug1EgqkbsSb";
    2727    /**
    2828     * The default JOSM OAuth consumer secret (created by user josmeditor).
    2929     */
    30     static public final String DEFAULT_JOSM_CONSUMER_SECRET = "rIkjpPcBNkMQxrqzcOvOC4RRuYupYr7k8mfP13H5";
     30    public static final String DEFAULT_JOSM_CONSUMER_SECRET = "rIkjpPcBNkMQxrqzcOvOC4RRuYupYr7k8mfP13H5";
    3131    /**
    3232     * The default OSM OAuth request token URL.
    3333     */
    34     static public final String DEFAULT_REQUEST_TOKEN_URL = Main.OSM_WEBSITE + "/oauth/request_token";
     34    public static final String DEFAULT_REQUEST_TOKEN_URL = Main.OSM_WEBSITE + "/oauth/request_token";
    3535    /**
    3636     * The default OSM OAuth access token URL.
    3737     */
    38     static public final String DEFAULT_ACCESS_TOKEN_URL = Main.OSM_WEBSITE + "/oauth/access_token";
     38    public static final String DEFAULT_ACCESS_TOKEN_URL = Main.OSM_WEBSITE + "/oauth/access_token";
    3939    /**
    4040     * The default OSM OAuth authorize URL.
    4141     */
    42     static public final String DEFAULT_AUTHORISE_URL = Main.OSM_WEBSITE + "/oauth/authorize";
     42    public static final String DEFAULT_AUTHORISE_URL = Main.OSM_WEBSITE + "/oauth/authorize";
    4343
    4444
     
    4949     * @return a set of default parameters
    5050     */
    51     static public OAuthParameters createDefault() {
     51    public static OAuthParameters createDefault() {
    5252        return createDefault(null);
    5353    }
     
    6262     * @since 5422
    6363     */
    64     static public OAuthParameters createDefault(String apiUrl) {
     64    public static OAuthParameters createDefault(String apiUrl) {
    6565        OAuthParameters parameters = new OAuthParameters();
    6666        parameters.setConsumerKey(DEFAULT_JOSM_CONSUMER_KEY);
     
    9090     * @return the parameters
    9191     */
    92     static public OAuthParameters createFromPreferences(Preferences pref) {
     92    public static OAuthParameters createFromPreferences(Preferences pref) {
    9393        OAuthParameters parameters = createDefault(pref.get("osm-server.url"));
    9494        parameters.setConsumerKey(pref.get("oauth.settings.consumer-key", parameters.getConsumerKey()));
  • trunk/src/org/openstreetmap/josm/data/oauth/OAuthToken.java

    r5266 r6883  
    1414     * @return the token
    1515     */
    16     static public OAuthToken createToken(OAuthConsumer consumer) {
     16    public static OAuthToken createToken(OAuthConsumer consumer) {
    1717        return new OAuthToken(consumer.getToken(), consumer.getTokenSecret());
    1818    }
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java

    r6362 r6883  
    4242     *
    4343     */
    44     static public final String PREF_KEY_RENDERER_CLASS_NAME = "mappaint.renderer-class-name";
    45 
    46     static public class MapRendererFactoryException extends RuntimeException {
     44    public static final String PREF_KEY_RENDERER_CLASS_NAME = "mappaint.renderer-class-name";
     45
     46    public static class MapRendererFactoryException extends RuntimeException {
    4747        public MapRendererFactoryException() {
    4848        }
     
    6161    }
    6262
    63     static public class Descriptor {
     63    public static class Descriptor {
    6464        private Class<? extends AbstractMapRenderer> renderer;
    6565        private String displayName;
     
    8585    }
    8686
    87     static private MapRendererFactory instance;
     87    private static MapRendererFactory instance;
    8888
    8989    /**
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java

    r6713 r6883  
    3232     * <em>outer</em> polygon. Default is <tt>outer</tt>.
    3333     */
    34     static public final String PREF_KEY_OUTER_ROLES = "mappaint.multipolygon.outer.roles";
     34    public static final String PREF_KEY_OUTER_ROLES = "mappaint.multipolygon.outer.roles";
    3535    /** preference key for collection of role prefixes which indicate that the respective
    3636     *  member belongs to an <em>outer</em> polygon. Default is empty.
    3737     */
    38     static public final String PREF_KEY_OUTER_ROLE_PREFIXES = "mappaint.multipolygon.outer.role-prefixes";
     38    public static final String PREF_KEY_OUTER_ROLE_PREFIXES = "mappaint.multipolygon.outer.role-prefixes";
    3939    /** preference key for a collection of roles which indicate that the respective member belongs to an
    4040     * <em>inner</em> polygon. Default is <tt>inner</tt>.
    4141     */
    42     static public final String PREF_KEY_INNER_ROLES = "mappaint.multipolygon.inner.roles";
     42    public static final String PREF_KEY_INNER_ROLES = "mappaint.multipolygon.inner.roles";
    4343    /** preference key for collection of role prefixes which indicate that the respective
    4444     *  member belongs to an <em>inner</em> polygon. Default is empty.
    4545     */
    46     static public final String PREF_KEY_INNER_ROLE_PREFIXES = "mappaint.multipolygon.inner.role-prefixes";
     46    public static final String PREF_KEY_INNER_ROLE_PREFIXES = "mappaint.multipolygon.inner.role-prefixes";
    4747
    4848    /**
  • trunk/src/org/openstreetmap/josm/data/projection/AbstractProjection.java

    r6248 r6883  
    2121 * In addition, either datum or nadgrid has to be initialized to some value.
    2222 */
    23 abstract public class AbstractProjection implements Projection {
     23public abstract class AbstractProjection implements Projection {
    2424
    2525    protected Ellipsoid ellps;
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r6854 r6883  
    7575        public boolean hasValue;
    7676
    77         public final static Map<String, Param> paramsByKey = new HashMap<String, Param>();
     77        public static final Map<String, Param> paramsByKey = new HashMap<String, Param>();
    7878        static {
    7979            for (Param p : Param.values()) {
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r6488 r6883  
    6060     * should be compatible to PROJ.4
    6161     */
    62     final public static Map<String, ProjFactory> projs = new HashMap<String, ProjFactory>();
    63     final public static Map<String, Ellipsoid> ellipsoids = new HashMap<String, Ellipsoid>();
    64     final public static Map<String, Datum> datums = new HashMap<String, Datum>();
    65     final public static Map<String, NTV2GridShiftFileWrapper> nadgrids = new HashMap<String, NTV2GridShiftFileWrapper>();
    66     final public static Map<String, Pair<String, String>> inits = new HashMap<String, Pair<String, String>>();
     62    public static final Map<String, ProjFactory> projs = new HashMap<String, ProjFactory>();
     63    public static final Map<String, Ellipsoid> ellipsoids = new HashMap<String, Ellipsoid>();
     64    public static final Map<String, Datum> datums = new HashMap<String, Datum>();
     65    public static final Map<String, NTV2GridShiftFileWrapper> nadgrids = new HashMap<String, NTV2GridShiftFileWrapper>();
     66    public static final Map<String, Pair<String, String>> inits = new HashMap<String, Pair<String, String>>();
    6767
    6868    static {
     
    158158    }
    159159
    160     private final static Set<String> allCodes = new HashSet<String>();
    161     private final static Map<String, ProjectionChoice> allProjectionChoicesByCode = new HashMap<String, ProjectionChoice>();
    162     private final static Map<String, Projection> projectionsByCode_cache = new HashMap<String, Projection>();
     160    private static final Set<String> allCodes = new HashSet<String>();
     161    private static final Map<String, ProjectionChoice> allProjectionChoicesByCode = new HashMap<String, ProjectionChoice>();
     162    private static final Map<String, Projection> projectionsByCode_cache = new HashMap<String, Projection>();
    163163
    164164    static {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/AbstractDatum.java

    r6069 r6883  
    44import org.openstreetmap.josm.data.projection.Ellipsoid;
    55
    6 abstract public class AbstractDatum implements Datum {
     6public abstract class AbstractDatum implements Datum {
    77
    88    protected String name;
     
    1010    protected Ellipsoid ellps;
    1111
     12    /**
     13     * Constructs a new {@code AbstractDatum}.
     14     * @param name The name
     15     * @param proj4Id The Proj4 identifier
     16     * @param ellps The ellipsoid
     17     */
    1218    public AbstractDatum(String name, String proj4Id, Ellipsoid ellps) {
    1319        this.name = name;
  • trunk/src/org/openstreetmap/josm/data/projection/datum/GRS80Datum.java

    r6362 r6883  
    1212public final class GRS80Datum extends NullDatum {
    1313
    14     public final static GRS80Datum INSTANCE = new GRS80Datum();
     14    /**
     15     * The unique instance.
     16     */
     17    public static final GRS80Datum INSTANCE = new GRS80Datum();
    1518
    1619    private GRS80Datum() {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java

    r6488 r6883  
    2020     * Description of Transformation - DE_DHDN (BeTA, 2007) to ETRS89</a>
    2121     */
    22     public final static NTV2GridShiftFileWrapper BETA2007 = new NTV2GridShiftFileWrapper("resource://data/projection/BETA2007.gsb");
     22    public static final NTV2GridShiftFileWrapper BETA2007 = new NTV2GridShiftFileWrapper("resource://data/projection/BETA2007.gsb");
    2323
    2424    /**
     
    2828     * [French] Transformation de coordonnées NTF – RGF93 / Format de grille NTv2</a>
    2929     */
    30     public final static NTV2GridShiftFileWrapper ntf_rgf93 = new NTV2GridShiftFileWrapper("resource://data/projection/ntf_r93_b.gsb");
    31 
     30    public static final NTV2GridShiftFileWrapper ntf_rgf93 = new NTV2GridShiftFileWrapper("resource://data/projection/ntf_r93_b.gsb");
    3231
    3332    private NTV2GridShiftFile instance = null;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java

    r6362 r6883  
    2828    protected double e;
    2929
    30     public static abstract class Parameters {
     30    public abstract static class Parameters {
    3131        public final double latitudeOrigin;
    3232        public Parameters(double latitudeOrigin) {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r6830 r6883  
    8787    }
    8888
    89     protected final static int DUPLICATE_NODE = 1;
    90     protected final static int DUPLICATE_NODE_MIXED = 2;
    91     protected final static int DUPLICATE_NODE_OTHER = 3;
    92     protected final static int DUPLICATE_NODE_BUILDING = 10;
    93     protected final static int DUPLICATE_NODE_BOUNDARY = 11;
    94     protected final static int DUPLICATE_NODE_HIGHWAY = 12;
    95     protected final static int DUPLICATE_NODE_LANDUSE = 13;
    96     protected final static int DUPLICATE_NODE_NATURAL = 14;
    97     protected final static int DUPLICATE_NODE_POWER = 15;
    98     protected final static int DUPLICATE_NODE_RAILWAY = 16;
    99     protected final static int DUPLICATE_NODE_WATERWAY = 17;
     89    protected static final int DUPLICATE_NODE = 1;
     90    protected static final int DUPLICATE_NODE_MIXED = 2;
     91    protected static final int DUPLICATE_NODE_OTHER = 3;
     92    protected static final int DUPLICATE_NODE_BUILDING = 10;
     93    protected static final int DUPLICATE_NODE_BOUNDARY = 11;
     94    protected static final int DUPLICATE_NODE_HIGHWAY = 12;
     95    protected static final int DUPLICATE_NODE_LANDUSE = 13;
     96    protected static final int DUPLICATE_NODE_NATURAL = 14;
     97    protected static final int DUPLICATE_NODE_POWER = 15;
     98    protected static final int DUPLICATE_NODE_RAILWAY = 16;
     99    protected static final int DUPLICATE_NODE_WATERWAY = 17;
    100100
    101101    /** The map of potential duplicates.
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r6830 r6883  
    151151    public static void addEditLayerChangeListener(EditLayerChangeListener listener, boolean initialFire) {
    152152        addEditLayerChangeListener(listener);
    153         if (initialFire) {
    154             if (Main.isDisplayingMapView() && Main.map.mapView.getEditLayer() != null) {
    155                 fireEditLayerChanged(null, Main.map.mapView.getEditLayer());
    156             }
     153        if (initialFire && Main.isDisplayingMapView() && Main.map.mapView.getEditLayer() != null) {
     154            fireEditLayerChanged(null, Main.map.mapView.getEditLayer());
    157155        }
    158156    }
  • trunk/src/org/openstreetmap/josm/gui/actionsupport/DeleteFromRelationConfirmationDialog.java

    r6316 r6883  
    5252public class DeleteFromRelationConfirmationDialog extends JDialog implements TableModelListener {
    5353    /** the unique instance of this dialog */
    54     static private DeleteFromRelationConfirmationDialog instance;
     54    private static DeleteFromRelationConfirmationDialog instance;
    5555
    5656    /**
     
    5959     * @return The unique instance of this dialog
    6060     */
    61     static public DeleteFromRelationConfirmationDialog getInstance() {
     61    public static DeleteFromRelationConfirmationDialog getInstance() {
    6262        if (instance == null) {
    6363            instance = new DeleteFromRelationConfirmationDialog();
  • trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java

    r6822 r6883  
    217217     *
    218218     */
    219     static private class TileGridInputPanel extends JPanel implements PropertyChangeListener{
    220         static public final String TILE_BOUNDS_PROP = TileGridInputPanel.class.getName() + ".tileBounds";
     219    private static class TileGridInputPanel extends JPanel implements PropertyChangeListener{
     220        public static final String TILE_BOUNDS_PROP = TileGridInputPanel.class.getName() + ".tileBounds";
    221221
    222222        private JosmTextField tfMaxY;
     
    437437     *
    438438     */
    439     static private class TileAddressInputPanel extends JPanel {
    440 
    441         static public final String TILE_BOUNDS_PROP = TileAddressInputPanel.class.getName() + ".tileBounds";
     439    private static class TileAddressInputPanel extends JPanel {
     440
     441        public static final String TILE_BOUNDS_PROP = TileAddressInputPanel.class.getName() + ".tileBounds";
    442442
    443443        private JosmTextField tfTileAddress;
     
    526526     * Validates a tile address
    527527     */
    528     static private class TileAddressValidator extends AbstractTextComponentValidator {
     528    private static class TileAddressValidator extends AbstractTextComponentValidator {
    529529
    530530        private TileBounds tileBounds = null;
     
    585585     *
    586586     */
    587     static private class TileCoordinateValidator extends AbstractTextComponentValidator {
     587    private static class TileCoordinateValidator extends AbstractTextComponentValidator {
    588588        private int zoomLevel;
    589589        private int tileIndex;
     
    633633     *
    634634     */
    635     static private class TileBounds {
     635    private static class TileBounds {
    636636        public Point min;
    637637        public Point max;
     
    663663     * The map view used in this bounding box chooser
    664664     */
    665     static private class TileBoundsMapView extends JMapViewer {
     665    private static class TileBoundsMapView extends JMapViewer {
    666666        private Point min;
    667667        private Point max;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java

    r6814 r6883  
    5656     *  {@link #isResolvedCompletely()}
    5757     */
    58     static public final String RESOLVED_COMPLETELY_PROP = ConflictResolver.class.getName() + ".resolvedCompletely";
     58    public static final String RESOLVED_COMPLETELY_PROP = ConflictResolver.class.getName() + ".resolvedCompletely";
    5959    /**
    6060     * name of the property for the {@link OsmPrimitive} in the role "my"
    6161     */
    62     static public final String MY_PRIMITIVE_PROP = ConflictResolver.class.getName() + ".myPrimitive";
     62    public static final String MY_PRIMITIVE_PROP = ConflictResolver.class.getName() + ".myPrimitive";
    6363
    6464    /**
    6565     * name of the property for the {@link OsmPrimitive} in the role "my"
    6666     */
    67     static public final String THEIR_PRIMITIVE_PROP = ConflictResolver.class.getName() + ".theirPrimitive";
     67    public static final String THEIR_PRIMITIVE_PROP = ConflictResolver.class.getName() + ".theirPrimitive";
    6868
    6969    private JTabbedPane tabbedPane = null;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java

    r6666 r6883  
    8080    private  JLabel lblFrozenState;
    8181
    82     abstract protected JScrollPane buildMyElementsTable();
    83     abstract protected JScrollPane buildMergedElementsTable();
    84     abstract protected JScrollPane buildTheirElementsTable();
     82    protected abstract JScrollPane buildMyElementsTable();
     83    protected abstract JScrollPane buildMergedElementsTable();
     84    protected abstract JScrollPane buildTheirElementsTable();
    8585
    8686    protected JScrollPane embeddInScrollPane(JTable table) {
     
    770770    }
    771771
    772     static public interface FreezeActionProperties {
     772    public static interface FreezeActionProperties {
    773773        String PROP_SELECTED = FreezeActionProperties.class.getName() + ".selected";
    774774    }
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java

    r5481 r6883  
    3939public class PropertiesMergeModel extends Observable {
    4040
    41     static public final String RESOLVED_COMPLETELY_PROP = PropertiesMergeModel.class.getName() + ".resolvedCompletely";
    42     static public final String DELETE_PRIMITIVE_PROP = PropertiesMergeModel.class.getName() + ".deletePrimitive";
     41    public static final String RESOLVED_COMPLETELY_PROP = PropertiesMergeModel.class.getName() + ".resolvedCompletely";
     42    public static final String DELETE_PRIMITIVE_PROP = PropertiesMergeModel.class.getName() + ".deletePrimitive";
    4343
    4444    private OsmPrimitive my;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java

    r5832 r6883  
    3030 */
    3131public class TagMergeModel extends DefaultTableModel {
    32     static public final String PROP_NUM_UNDECIDED_TAGS = TagMergeModel.class.getName() + ".numUndecidedTags";
     32    public static final String PROP_NUM_UNDECIDED_TAGS = TagMergeModel.class.getName() + ".numUndecidedTags";
    3333
    3434    /** the list of tag merge items */
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java

    r6362 r6883  
    146146     *
    147147     */
    148     static private class EditorCellRenderer extends JLabel implements ListCellRenderer {
     148    private static class EditorCellRenderer extends JLabel implements ListCellRenderer {
    149149
    150150        public EditorCellRenderer() {
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r6264 r6883  
    4444
    4545public class PasteTagsConflictResolverDialog extends JDialog  implements PropertyChangeListener {
    46     static private final Map<OsmPrimitiveType, String> PANE_TITLES;
     46    private static final Map<OsmPrimitiveType, String> PANE_TITLES;
    4747    static {
    4848        PANE_TITLES = new HashMap<OsmPrimitiveType, String>();
     
    354354    }
    355355
    356     static public class StatisticsInfo {
     356    public static class StatisticsInfo {
    357357        public int numTags;
    358358        public Map<OsmPrimitiveType, Integer> sourceInfo;
     
    365365    }
    366366
    367     static private class StatisticsTableColumnModel extends DefaultTableColumnModel {
     367    private static class StatisticsTableColumnModel extends DefaultTableColumnModel {
    368368        public StatisticsTableColumnModel() {
    369369            TableCellRenderer renderer = new StatisticsInfoRenderer();
     
    393393    }
    394394
    395     static private class StatisticsTableModel extends DefaultTableModel {
     395    private static class StatisticsTableModel extends DefaultTableModel {
    396396        private static final String[] HEADERS = new String[] {tr("Paste ..."), tr("From ..."), tr("To ...") };
    397397        private List<StatisticsInfo> data;
     
    432432    }
    433433
    434     static private class StatisticsInfoRenderer extends JLabel implements TableCellRenderer {
     434    private static class StatisticsInfoRenderer extends JLabel implements TableCellRenderer {
    435435        protected void reset() {
    436436            setIcon(null);
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionType.java

    r3083 r6883  
    2323    UNDECIDED;
    2424
    25     static public void prepareLabel(RelationMemberConflictDecisionType decision, JLabel label) {
     25    public static void prepareLabel(RelationMemberConflictDecisionType decision, JLabel label) {
    2626        switch(decision) {
    2727        case REMOVE:
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java

    r6802 r6883  
    2828public class RelationMemberConflictResolverModel extends DefaultTableModel {
    2929    /** the property name for the number conflicts managed by this model */
    30     static public final String NUM_CONFLICTS_PROP = RelationMemberConflictResolverModel.class.getName() + ".numConflicts";
     30    public static final String NUM_CONFLICTS_PROP = RelationMemberConflictResolverModel.class.getName() + ".numConflicts";
    3131
    3232    /** the list of conflict decisions */
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java

    r6806 r6883  
    2020
    2121public class TagConflictResolverModel extends DefaultTableModel {
    22     static public final String NUM_CONFLICTS_PROP = TagConflictResolverModel.class.getName() + ".numConflicts";
     22    public static final String NUM_CONFLICTS_PROP = TagConflictResolverModel.class.getName() + ".numConflicts";
    2323
    2424    private TagCollection tags;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java

    r6317 r6883  
    2828
    2929    /** the name of the property for the currently selected changeset in the detail view */
    30     public final static String CHANGESET_IN_DETAIL_VIEW_PROP = ChangesetCacheManagerModel.class.getName() + ".changesetInDetailView";
     30    public static final String CHANGESET_IN_DETAIL_VIEW_PROP = ChangesetCacheManagerModel.class.getName() + ".changesetInDetailView";
    3131
    3232    private final List<Changeset> data = new ArrayList<Changeset>();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java

    r6316 r6883  
    140140     *
    141141     */
    142     static private class ChangesetContentEntry implements ChangesetDataSetEntry{
     142    private static class ChangesetContentEntry implements ChangesetDataSetEntry{
    143143        private final ChangesetModificationType modificationType;
    144144        private final HistoryOsmPrimitive primitive;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java

    r6830 r6883  
    4444     * @return the download task
    4545     */
    46     static public ChangesetHeaderDownloadTask buildTaskForChangesets(Collection<Changeset> changesets) {
     46    public static ChangesetHeaderDownloadTask buildTaskForChangesets(Collection<Changeset> changesets) {
    4747        return buildTaskForChangesets(Main.parent, changesets);
    4848    }
     
    5959     * @throws IllegalArgumentException thrown if parent is null
    6060     */
    61     static public ChangesetHeaderDownloadTask buildTaskForChangesets(Component parent, Collection<Changeset> changesets) {
     61    public static ChangesetHeaderDownloadTask buildTaskForChangesets(Component parent, Collection<Changeset> changesets) {
    6262        CheckParameterUtil.ensureParameterNotNull(parent, "parent");
    6363        if (changesets == null) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r6666 r6883  
    373373     *
    374374     */
    375     static private class UserRestrictionPanel extends JPanel {
     375    private static class UserRestrictionPanel extends JPanel {
    376376        private ButtonGroup bgUserRestrictions;
    377377        private JRadioButton rbRestrictToMyself;
     
    635635     * This is the panel to apply a time restriction to the changeset query
    636636     */
    637     static private class TimeRestrictionPanel extends JPanel {
     637    private static class TimeRestrictionPanel extends JPanel {
    638638
    639639        private JRadioButton rbClosedAfter;
     
    968968     *
    969969     */
    970     static private class UidInputFieldValidator extends AbstractTextComponentValidator {
    971         static public UidInputFieldValidator decorate(JTextComponent tc) {
     970    private static class UidInputFieldValidator extends AbstractTextComponentValidator {
     971        public static UidInputFieldValidator decorate(JTextComponent tc) {
    972972            return new UidInputFieldValidator(tc);
    973973        }
     
    10151015    }
    10161016
    1017     static private class UserNameInputValidator extends AbstractTextComponentValidator {
    1018         static public UserNameInputValidator decorate(JTextComponent tc) {
     1017    private static class UserNameInputValidator extends AbstractTextComponentValidator {
     1018        public static UserNameInputValidator decorate(JTextComponent tc) {
    10191019            return new UserNameInputValidator(tc);
    10201020        }
     
    10461046     * Dates can be entered in one of four standard formats defined for the current locale.
    10471047     */
    1048     static private class DateValidator extends AbstractTextComponentValidator {
    1049         static public DateValidator decorate(JTextComponent tc) {
     1048    private static class DateValidator extends AbstractTextComponentValidator {
     1049        public static DateValidator decorate(JTextComponent tc) {
    10501050            return new DateValidator(tc);
    10511051        }
     
    11091109     * Time values can be entered in one of four standard formats defined for the current locale.
    11101110     */
    1111     static private class TimeValidator extends AbstractTextComponentValidator {
    1112         static public TimeValidator decorate(JTextComponent tc) {
     1111    private static class TimeValidator extends AbstractTextComponentValidator {
     1112        public static TimeValidator decorate(JTextComponent tc) {
    11131113            return new TimeValidator(tc);
    11141114        }
  • trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java

    r6380 r6883  
    4747    /** displays information about the current download area */
    4848    private JMultilineLabel lblCurrentDownloadArea;
    49     final private JosmTextArea bboxDisplay = new JosmTextArea();
     49    private final JosmTextArea bboxDisplay = new JosmTextArea();
    5050    /** the add action */
    5151    private AddAction actAdd;
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r6509 r6883  
    4848
    4949/**
    50  *
     50 * Dialog displayed to download OSM and/or GPS data from OSM server.
    5151 */
    5252public class DownloadDialog extends JDialog  {
    5353    /** the unique instance of the download dialog */
    54     static private DownloadDialog instance;
     54    private static DownloadDialog instance;
    5555
    5656    /**
     
    5959     * @return the unique instance of the download dialog
    6060     */
    61     static public DownloadDialog getInstance() {
     61    public static DownloadDialog getInstance() {
    6262        if (instance == null) {
    6363            instance = new DownloadDialog(Main.parent);
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r6822 r6883  
    7070    private JTable tblSearchResults;
    7171    private DownloadDialog parent;
    72     private final static Server[] servers = new Server[]{
    73         new Server("Nominatim","http://nominatim.openstreetmap.org/search?format=xml&q=",tr("Class Type"),tr("Bounds")),
    74         //new Server("Namefinder","http://gazetteer.openstreetmap.org/namefinder/search.xml?find=",tr("Near"),trc("placeselection", "Zoom"))
     72    private static final Server[] SERVERS = new Server[] {
     73        new Server("Nominatim","http://nominatim.openstreetmap.org/search?format=xml&q=",tr("Class Type"),tr("Bounds"))
    7574    };
    76     private final JosmComboBox server = new JosmComboBox(servers);
     75    private final JosmComboBox server = new JosmComboBox(SERVERS);
    7776
    7877    private static class Server {
     
    101100        lpanel.add(new JLabel(tr("Choose the server for searching:")));
    102101        lpanel.add(server);
    103         String s = Main.pref.get("namefinder.server", servers[0].name);
    104         for (int i = 0; i < servers.length; ++i) {
    105             if (servers[i].name.equals(s)) {
     102        String s = Main.pref.get("namefinder.server", SERVERS[0].name);
     103        for (int i = 0; i < SERVERS.length; ++i) {
     104            if (SERVERS[i].name.equals(s)) {
    106105                server.setSelectedIndex(i);
    107106            }
     
    172171     * Data storage for search results.
    173172     */
    174     static private class SearchResult {
     173    private static class SearchResult {
    175174        public String name;
    176175        public String info;
     
    450449            // column 2 - Near
    451450            col3 = new TableColumn(2);
    452             col3.setHeaderValue(servers[0].thirdcol);
     451            col3.setHeaderValue(SERVERS[0].thirdcol);
    453452            col3.setResizable(true);
    454453            col3.setPreferredWidth(100);
     
    458457            // column 3 - Zoom
    459458            col4 = new TableColumn(3);
    460             col4.setHeaderValue(servers[0].fourthcol);
     459            col4.setHeaderValue(SERVERS[0].fourthcol);
    461460            col4.setResizable(true);
    462461            col4.setPreferredWidth(50);
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java

    r6827 r6883  
    7272     * @return the unique instance of the help browser
    7373     */
    74     static public HelpBrowser getInstance() {
     74    public static HelpBrowser getInstance() {
    7575        if (instance == null) {
    7676            instance = new HelpBrowser();
     
    103103     * @param helpTopic the help topic
    104104     */
    105     static public void launchBrowser(String helpTopic) {
     105    public static void launchBrowser(String helpTopic) {
    106106        HelpBrowser browser = getInstance();
    107107        browser.openHelpTopic(helpTopic);
  • trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java

    r6105 r6883  
    2929
    3030    /** background color used when the coordinates are different */
    31     public final static Color BGCOLOR_DIFFERENCE = new Color(255,197,197);
     31    public static final Color BGCOLOR_DIFFERENCE = new Color(255,197,197);
    3232
    3333    /** the model */
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r6743 r6883  
    2727
    2828public class HistoryBrowserDialogManager implements MapView.LayerChangeListener {
    29     static private HistoryBrowserDialogManager instance;
    30     static public HistoryBrowserDialogManager getInstance() {
     29    private static HistoryBrowserDialogManager instance;
     30    public static HistoryBrowserDialogManager getInstance() {
    3131        if (instance == null) {
    3232            instance = new HistoryBrowserDialogManager();
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListTableCellRenderer.java

    r6084 r6883  
    1717public class NodeListTableCellRenderer extends JLabel implements TableCellRenderer {
    1818
    19     public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
     19    public static final Color BGCOLOR_SELECTED = new Color(143,170,255);
    2020
    2121    private ImageIcon nodeIcon;
    2222
     23    /**
     24     * Constructs a new {@code NodeListTableCellRenderer}.
     25     */
    2326    public NodeListTableCellRenderer(){
    2427        setOpaque(true);
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java

    r6792 r6883  
    280280    }
    281281
    282     static private PrimitiveId primitiveIdAtRow(TableModel model, int row) {
     282    private static PrimitiveId primitiveIdAtRow(TableModel model, int row) {
    283283        DiffTableModel castedModel = (DiffTableModel) model;
    284284        Long id = (Long)castedModel.getValueAt(row, 0).value;
  • trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java

    r6316 r6883  
    2626public class RelationMemberListTableCellRenderer extends JLabel implements TableCellRenderer {
    2727
    28     public final static Color BGCOLOR_EMPTY_ROW = new Color(234,234,234);
    29     public final static Color BGCOLOR_NOT_IN_OPPOSITE = new Color(255,197,197);
    30     public final static Color BGCOLOR_IN_OPPOSITE = new Color(255,234,213);
    31     public final static Color BGCOLOR_SELECTED = new Color(143,170,255);
     28    public static final Color BGCOLOR_EMPTY_ROW = new Color(234,234,234);
     29    public static final Color BGCOLOR_NOT_IN_OPPOSITE = new Color(255,197,197);
     30    public static final Color BGCOLOR_IN_OPPOSITE = new Color(255,234,213);
     31    public static final Color BGCOLOR_SELECTED = new Color(143,170,255);
    3232
    3333    private Map<OsmPrimitiveType, ImageIcon> icons;
    3434
    35     public RelationMemberListTableCellRenderer(){
     35    /**
     36     * Constructs a new {@code RelationMemberListTableCellRenderer}.
     37     */
     38    public RelationMemberListTableCellRenderer() {
    3639        setOpaque(true);
    3740        icons = new HashMap<OsmPrimitiveType, ImageIcon>();
  • trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java

    r6084 r6883  
    1818 */
    1919public class TagTableCellRenderer extends JLabel implements TableCellRenderer {
    20     public final static Color BGCOLOR_DIFFERENCE = new Color(255,197,197);
     20    public static final Color BGCOLOR_DIFFERENCE = new Color(255,197,197);
    2121
     22    /**
     23     * Constructs a new {@code TagTableCellRenderer}.
     24     */
    2225    public TagTableCellRenderer() {
    2326        setOpaque(true);
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r6822 r6883  
    657657        syncDialog.pack();
    658658        syncDialog.addWindowListener(new WindowAdapter() {
    659             final static int CANCEL = -1;
    660             final static int DONE = 0;
    661             final static int AGAIN = 1;
    662             final static int NOTHING = 2;
     659            static final int CANCEL = -1;
     660            static final int DONE = 0;
     661            static final int AGAIN = 1;
     662            static final int NOTHING = 2;
    663663            private int checkAndSave() {
    664664                if (syncDialog.isVisible())
     
    686686                }
    687687
    688                 if (lastNumMatched == 0) {
    689                     if (new ExtendedDialog(
     688                if (lastNumMatched == 0 && new ExtendedDialog(
    690689                            Main.parent,
    691690                            tr("Correlate images with GPX track"),
     
    694693                            setButtonIcons(new String[] { "ok.png", "dialogs/refresh.png"}).
    695694                            showDialog().getValue() == 2)
    696                         return AGAIN;
    697                 }
     695                    return AGAIN;
    698696                return DONE;
    699697            }
     
    10841082            }
    10851083
    1086             if (e.getExifCoor() != null) {
    1087                 if (!exif) {
    1088                     continue;
    1089                 }
    1090             }
    1091 
    1092             if (e.isTagged() && e.getExifCoor() == null) {
    1093                 if (!tagged) {
    1094                     continue;
    1095                 }
     1084            if (e.getExifCoor() != null && !exif) {
     1085                continue;
     1086            }
     1087
     1088            if (e.isTagged() && e.getExifCoor() == null && !tagged) {
     1089                continue;
    10961090            }
    10971091
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java

    r6798 r6883  
    1212 * Stores info about each image
    1313 */
    14 final public class ImageEntry implements Comparable<ImageEntry>, Cloneable {
     14public final class ImageEntry implements Comparable<ImageEntry>, Cloneable {
    1515    private File file;
    1616    private Integer exifOrientation;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/JpegFileFilter.java

    r6296 r6883  
    66import java.io.File;
    77
    8 class JpegFileFilter extends javax.swing.filechooser.FileFilter
    9                                     implements java.io.FileFilter {
     8class JpegFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter {
    109
    11     static final private JpegFileFilter instance = new JpegFileFilter();
     10    private static final JpegFileFilter instance = new JpegFileFilter();
    1211    public static JpegFileFilter getInstance() {
    1312        return instance;
    1413    }
    1514
    16     @Override public boolean accept(File f) {
     15    @Override
     16    public boolean accept(File f) {
    1717        if (f.isDirectory()) {
    1818            return true;
     
    2323    }
    2424
    25     @Override public String getDescription() {
     25    @Override
     26    public String getDescription() {
    2627        return tr("JPEG images (*.jpg)");
    2728    }
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r6830 r6883  
    8888        // will make gui for it so I'm keeping it here
    8989
    90         private final static Map<String, TemplateEntryProperty> cache = new HashMap<String, TemplateEntryProperty>();
     90        private static final Map<String, TemplateEntryProperty> CACHE = new HashMap<String, TemplateEntryProperty>();
    9191
    9292        // Legacy code - convert label from int to template engine expression
     
    111111                key += "." + layerName;
    112112            }
    113             TemplateEntryProperty result = cache.get(key);
     113            TemplateEntryProperty result = CACHE.get(key);
    114114            if (result == null) {
    115115                String defaultValue = layerName == null ? getDefaultLabelPattern():"";
     
    117117                try {
    118118                    result = new TemplateEntryProperty(key, defaultValue, parent);
    119                     cache.put(key, result);
     119                    CACHE.put(key, result);
    120120                } catch (ParseError e) {
    121121                    Main.warn("Unable to parse template engine pattern ''{0}'' for property {1}", defaultValue, key);
     
    130130                key += "." + layerName;
    131131            }
    132             TemplateEntryProperty result = cache.get(key);
     132            TemplateEntryProperty result = CACHE.get(key);
    133133            if (result == null) {
    134134                String defaultValue = layerName == null?"?{ '{name}' | '{desc}' | '{" + Marker.MARKER_FORMATTED_OFFSET + "}' }":"";
     
    136136                try {
    137137                    result = new TemplateEntryProperty(key, defaultValue, parent);
    138                     cache.put(key, result);
     138                    CACHE.put(key, result);
    139139                } catch (ParseError e) {
    140140                    Main.warn("Unable to parse template engine pattern ''{0}'' for property {1}", defaultValue, key);
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r6380 r6883  
    172172     * Return a static icon.
    173173     */
    174     @Override public Icon getIcon() {
     174    @Override
     175    public Icon getIcon() {
    175176        return ImageProvider.get("layer", "marker_small");
    176177    }
    177178
    178179    @Override
    179     public Color getColor(boolean ignoreCustom)
    180     {
     180    public Color getColor(boolean ignoreCustom) {
    181181        String name = getName();
    182182        return Main.pref.getColor(marktr("gps marker"), name != null ? "layer "+name : null, Color.gray);
     
    184184
    185185    /* for preferences */
    186     static public Color getGenericColor()
    187     {
     186    public static Color getGenericColor() {
    188187        return Main.pref.getColor(marktr("gps marker"), Color.gray);
    189188    }
    190189
    191     @Override public void paint(Graphics2D g, MapView mv, Bounds box) {
     190    @Override
     191    public void paint(Graphics2D g, MapView mv, Bounds box) {
    192192        boolean showTextOrIcon = isTextOrIconShown();
    193193        g.setColor(getColor(true));
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java

    r6830 r6883  
    3838    private Timer timer = null;
    3939    private double animationInterval = 0.0; // seconds
    40     static private PlayHeadMarker playHead = null;
     40    private static PlayHeadMarker playHead = null;
    4141    private MapMode oldMode = null;
    4242    private LatLon oldCoor;
     
    152152         * layer, even if it is only one at the start of the track) to
    153153         * offset the audio from */
    154         if (cw != null) {
    155             if (recent != null && recent.parentLayer != null) {
    156                 for (Marker m : recent.parentLayer.data) {
    157                     if (m instanceof AudioMarker) {
    158                         AudioMarker a = (AudioMarker) m;
    159                         if (a.time > cw.time) {
    160                             break;
    161                         }
    162                         ca = a;
     154        if (cw != null && recent != null && recent.parentLayer != null) {
     155            for (Marker m : recent.parentLayer.data) {
     156                if (m instanceof AudioMarker) {
     157                    AudioMarker a = (AudioMarker) m;
     158                    if (a.time > cw.time) {
     159                        break;
    163160                    }
     161                    ca = a;
    164162                }
    165163            }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java

    r5571 r6883  
    1717import org.openstreetmap.josm.tools.Utils;
    1818
    19 public class AreaElemStyle extends ElemStyle
    20 {
     19public class AreaElemStyle extends ElemStyle {
     20
    2121    /**
    2222     * If fillImage == null, color is the fill-color, otherwise
     
    7979    @Override
    8080    public void paintPrimitive(OsmPrimitive osm, MapPaintSettings paintSettings, StyledMapRenderer painter, boolean selected, boolean member) {
    81         if (osm instanceof Way)
    82         {
     81        if (osm instanceof Way) {
    8382            Color myColor = color;
    84             if (color != null) {
    85                 if (osm.isSelected()) {
    86                     myColor = paintSettings.getSelectedColor(color.getAlpha());
    87                 }
     83            if (color != null && osm.isSelected()) {
     84                myColor = paintSettings.getSelectedColor(color.getAlpha());
    8885            }
    8986            painter.drawArea((Way) osm, myColor, fillImage, text);
    90         } else if (osm instanceof Relation)
    91         {
     87        } else if (osm instanceof Relation) {
    9288            Color myColor = color;
    93             if (color != null) {
    94                 if (selected) {
    95                     myColor = paintSettings.getRelationSelectedColor(color.getAlpha());
    96                 }
     89            if (color != null && selected) {
     90                myColor = paintSettings.getRelationSelectedColor(color.getAlpha());
    9791            }
    9892            painter.drawArea((Relation) osm, myColor, fillImage, text);
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r6867 r6883  
    206206        for (StyleSource source : styles.getStyleSources()) {
    207207            source.loadStyleSource();
    208             if (Main.pref.getBoolean("mappaint.auto_reload_local_styles", true)) {
    209                 if (source.isLocal()) {
    210                     File f = new File(source.url);
    211                     source.setLastMTime(f.lastModified());
    212                 }
     208            if (Main.pref.getBoolean("mappaint.auto_reload_local_styles", true) && source.isLocal()) {
     209                File f = new File(source.url);
     210                source.setLastMTime(f.lastModified());
    213211            }
    214212        }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/CSSColors.java

    r6362 r6883  
    77
    88public final class CSSColors {
    9     private final static Map<String, Color> CSS_COLORS = new HashMap<String, Color>();
     9    private static final Map<String, Color> CSS_COLORS = new HashMap<String, Color>();
    1010    static {
    1111        Object[][] CSSCOLORS_INIT = new Object[][] {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r6859 r6883  
    2222import org.openstreetmap.josm.tools.Utils;
    2323
    24 abstract public class Condition {
    25 
    26     abstract public boolean applies(Environment e);
     24public abstract class Condition {
     25
     26    public abstract boolean applies(Environment e);
    2727
    2828    public static Condition createKeyValueCondition(String k, String v, Op op, Context context, boolean considerValAsKey) {
     
    132132
    133133    /**
    134      * context, where the condition applies
     134     * Context, where the condition applies.
    135135     */
    136136    public static enum Context {
     
    146146    }
    147147
    148     public final static EnumSet<Op> COMPARISON_OPERATERS =
     148    public static final EnumSet<Op> COMPARISON_OPERATERS =
    149149        EnumSet.of(Op.GREATER_OR_EQUAL, Op.GREATER, Op.LESS_OR_EQUAL, Op.LESS);
    150150
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r6830 r6883  
    589589    public static class NullExpression implements Expression {
    590590
    591         final public static NullExpression INSTANCE = new NullExpression();
     591        /**
     592         * The unique instance.
     593         */
     594        public static final NullExpression INSTANCE = new NullExpression();
    592595
    593596        @Override
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Instruction.java

    r6611 r6883  
    1111import org.openstreetmap.josm.gui.mappaint.StyleKeys;
    1212
    13 abstract public class Instruction implements StyleKeys {
     13public abstract class Instruction implements StyleKeys {
    1414
    1515    public abstract void execute(Environment env);
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

    r6830 r6883  
    311311
    312312    /**
    313      * Super class of {@link GeneralSelector} and {@link LinkSelector}
     313     * Super class of {@link GeneralSelector} and {@link LinkSelector}.
    314314     * @since 5841
    315315     */
    316     public static abstract class AbstractSelector implements Selector {
     316    public abstract static class AbstractSelector implements Selector {
    317317
    318318        protected final List<Condition> conds;
     
    466466        }
    467467
    468         final static double R = 6378135;
     468        static final double R = 6378135;
    469469
    470470        public static double level2scale(int lvl) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java

    r6821 r6883  
    88import org.openstreetmap.josm.gui.mappaint.Range;
    99
    10 abstract public class Prototype {
     10public abstract class Prototype {
    1111    // zoom range to display the feature
    1212    public Range range;
  • trunk/src/org/openstreetmap/josm/gui/oauth/AbstractAuthorizationUI.java

    r5422 r6883  
    1717     * The property name for the Access Token property
    1818     */
    19     static public final String ACCESS_TOKEN_PROP = AbstractAuthorizationUI.class.getName() + ".accessToken";
     19    public static final String ACCESS_TOKEN_PROP = AbstractAuthorizationUI.class.getName() + ".accessToken";
    2020
    2121    private String apiUrl;
  • trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java

    r6847 r6883  
    288288            switch (e.getStateChange()) {
    289289            case ItemEvent.SELECTED:
    290                 if (hasCustomSettings()) {
    291                     if (!confirmOverwriteCustomSettings()) {
    292                         cbUseDefaults.setSelected(false);
    293                         return;
    294                     }
     290                if (hasCustomSettings() && !confirmOverwriteCustomSettings()) {
     291                    cbUseDefaults.setSelected(false);
     292                    return;
    295293                }
    296294                resetToDefaultSettings();
  • trunk/src/org/openstreetmap/josm/gui/oauth/AuthorizationProcedureComboBox.java

    r6084 r6883  
    1515public class AuthorizationProcedureComboBox extends JosmComboBox {
    1616
     17    /**
     18     * Constructs a new {@code AuthorizationProcedureComboBox}.
     19     */
    1720    public AuthorizationProcedureComboBox() {
    1821        super(AuthorizationProcedure.values());
     
    2124    }
    2225
    23     static private class AuthorisationProcedureCellRenderer extends JLabel implements ListCellRenderer {
     26    private static class AuthorisationProcedureCellRenderer extends JLabel implements ListCellRenderer {
    2427        public AuthorisationProcedureCellRenderer() {
    2528            setOpaque(true);
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java

    r6666 r6883  
    401401    }
    402402
    403 
    404     static private class UserNameValidator extends AbstractTextComponentValidator {
     403    private static class UserNameValidator extends AbstractTextComponentValidator {
    405404        public UserNameValidator(JTextComponent tc) {
    406405            super(tc);
     
    422421    }
    423422
    424     static private class PasswordValidator extends AbstractTextComponentValidator {
     423    private static class PasswordValidator extends AbstractTextComponentValidator {
    425424
    426425        public PasswordValidator(JTextComponent tc) {
  • trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java

    r6335 r6883  
    5555    }
    5656
    57 
     57    /**
     58     * Constructs a new {@code FullyAutomaticPropertiesPanel}.
     59     */
    5860    public FullyAutomaticPropertiesPanel() {
    5961        setLayout(new GridBagLayout());
     
    7274    }
    7375
    74     static private class UserNameValidator extends AbstractTextComponentValidator {
     76    private static class UserNameValidator extends AbstractTextComponentValidator {
    7577
    7678        public UserNameValidator(JTextComponent tc) {
  • trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java

    r6087 r6883  
    196196    }
    197197
    198     static private class AccessTokenSecretValidator extends AbstractTextComponentValidator {
     198    private static class AccessTokenSecretValidator extends AbstractTextComponentValidator {
    199199        public AccessTokenSecretValidator(JTextComponent tc) throws IllegalArgumentException {
    200200            super(tc);
  • trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

    r6670 r6883  
    143143    // all created tabs
    144144    private final List<PreferenceTab> tabs = new ArrayList<PreferenceTab>();
    145     private final static Collection<PreferenceSettingFactory> settingsFactory = new LinkedList<PreferenceSettingFactory>();
     145    private static final Collection<PreferenceSettingFactory> settingsFactory = new LinkedList<PreferenceSettingFactory>();
    146146    private final List<PreferenceSetting> settings = new ArrayList<PreferenceSetting>();
    147147
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r6729 r6883  
    375375     * Load the list of source entries that the user has configured.
    376376     */
    377     abstract public Collection<? extends SourceEntry> getInitialSourcesList();
     377    public abstract Collection<? extends SourceEntry> getInitialSourcesList();
    378378
    379379    /**
    380380     * Load the list of configured icon paths.
    381381     */
    382     abstract public Collection<String> getInitialIconPathsList();
     382    public abstract Collection<String> getInitialIconPathsList();
    383383
    384384    /**
    385385     * Get the default list of entries (used when resetting the list).
    386386     */
    387     abstract public Collection<ExtendedSourceEntry> getDefault();
     387    public abstract Collection<ExtendedSourceEntry> getDefault();
    388388
    389389    /**
     
    391391     * @return true if restart is required
    392392     */
    393     abstract public boolean finish();
     393    public abstract boolean finish();
    394394
    395395    /**
    396396     * Provide the GUI strings. (There are differences for MapPaint and Preset)
    397397     */
    398     abstract protected String getStr(I18nString ident);
     398    protected abstract String getStr(I18nString ident);
    399399
    400400    /**
     
    15431543    }
    15441544
    1545     abstract public static class SourcePrefHelper {
     1545    public abstract static class SourcePrefHelper {
    15461546
    15471547        private final String pref;
     
    15591559         * @return the default sources provided by JOSM core
    15601560         */
    1561         abstract public Collection<ExtendedSourceEntry> getDefault();
    1562 
    1563         abstract public Map<String, String> serialize(SourceEntry entry);
    1564 
    1565         abstract public SourceEntry deserialize(Map<String, String> entryStr);
     1561        public abstract Collection<ExtendedSourceEntry> getDefault();
     1562
     1563        public abstract Map<String, String> serialize(SourceEntry entry);
     1564
     1565        public abstract SourceEntry deserialize(Map<String, String> entryStr);
    15661566
    15671567        /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java

    r6783 r6883  
    109109    }
    110110
    111     static private class LanguageCellRenderer extends DefaultListCellRenderer {
     111    private static class LanguageCellRenderer extends DefaultListCellRenderer {
    112112        private ListCellRenderer dispatch;
    113113        public LanguageCellRenderer(ListCellRenderer dispatch) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java

    r6733 r6883  
    189189         * The unique instance.
    190190         */
    191         public final static MapPaintPrefHelper INSTANCE = new MapPaintPrefHelper();
     191        public static final MapPaintPrefHelper INSTANCE = new MapPaintPrefHelper();
    192192
    193193        /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java

    r6856 r6883  
    325325         * The unique instance.
    326326         */
    327         public final static PresetPrefHelper INSTANCE = new PresetPrefHelper();
     327        public static final PresetPrefHelper INSTANCE = new PresetPrefHelper();
    328328
    329329        /**
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java

    r6814 r6883  
    4545     * OSM API URL property key.
    4646     */
    47     static public final String API_URL_PROP = OsmApiUrlInputPanel.class.getName() + ".apiUrl";
     47    public static final String API_URL_PROP = OsmApiUrlInputPanel.class.getName() + ".apiUrl";
    4848
    4949    private JLabel lblValid;
     
    241241    }
    242242
    243     static private class ApiUrlValidator extends AbstractTextComponentValidator {
     243    private static class ApiUrlValidator extends AbstractTextComponentValidator {
    244244        public ApiUrlValidator(JTextComponent tc) throws IllegalArgumentException {
    245245            super(tc);
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java

    r6643 r6883  
    7272         * @return The proxy policy matching the given name, or {@code null}
    7373         */
    74         static public ProxyPolicy fromName(String policyName) {
     74        public static ProxyPolicy fromName(String policyName) {
    7575            if (policyName == null) return null;
    7676            policyName = policyName.trim().toLowerCase();
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r6830 r6883  
    3333@SuppressWarnings("serial")
    3434public class TagEditorModel extends AbstractTableModel {
    35     static public final String PROP_DIRTY = TagEditorModel.class.getName() + ".dirty";
     35    public static final String PROP_DIRTY = TagEditorModel.class.getName() + ".dirty";
    3636
    3737    /** the list holding the tags */
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r6844 r6883  
    7777    public String locale_name;
    7878    public boolean preset_name_label;
    79     public final static String OPTIONAL_TOOLTIP_TEXT = "Optional tooltip text";
     79    public static final String OPTIONAL_TOOLTIP_TEXT = "Optional tooltip text";
    8080
    8181    /**
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java

    r6830 r6883  
    304304     * @since 6190
    305305     */
    306     public static abstract class TaggingPresetTextItem extends TaggingPresetItem {
     306    public abstract static class TaggingPresetTextItem extends TaggingPresetItem {
    307307
    308308        /**
     
    505505    }
    506506
    507     public static abstract class KeyedItem extends TaggingPresetItem {
     507    public abstract static class KeyedItem extends TaggingPresetItem {
    508508
    509509        public String key;
     
    893893    }
    894894
    895     public static abstract class ComboMultiSelect extends KeyedItem {
     895    public abstract static class ComboMultiSelect extends KeyedItem {
    896896
    897897        public String locale_text;
     
    13571357        }
    13581358    }
    1359     static public EnumSet<TaggingPresetType> getType(String types) throws SAXException {
     1359
     1360    public static EnumSet<TaggingPresetType> getType(String types) throws SAXException {
    13601361        if (typeCache.containsKey(types))
    13611362            return typeCache.get(types);
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java

    r6844 r6883  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.tagging;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.BorderLayout;
     
    1820import java.util.EnumSet;
    1921import java.util.HashSet;
    20 import java.util.LinkedList;
    2122import java.util.List;
     23
    2224import javax.swing.AbstractAction;
    2325import javax.swing.AbstractListModel;
     
    3638import javax.swing.event.ListSelectionEvent;
    3739import javax.swing.event.ListSelectionListener;
     40
    3841import org.openstreetmap.josm.Main;
    3942import org.openstreetmap.josm.data.SelectionChangedListener;
     
    4346import org.openstreetmap.josm.data.osm.Way;
    4447import org.openstreetmap.josm.data.preferences.BooleanProperty;
    45 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences;
    4648import org.openstreetmap.josm.gui.preferences.map.TaggingPresetPreference;
    4749import org.openstreetmap.josm.gui.tagging.TaggingPresetItems.Key;
     
    5052import org.openstreetmap.josm.gui.tagging.TaggingPresetItems.Roles;
    5153import org.openstreetmap.josm.gui.widgets.JosmTextField;
    52 import org.openstreetmap.josm.gui.widgets.ListPopupMenu;
    5354import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
    54 import static org.openstreetmap.josm.tools.I18n.tr;
    5555
    5656/**
     
    7777    private final List<PresetClassification> classifications = new ArrayList<PresetClassification>();
    7878    private ResultListModel lsResultModel = new ResultListModel();
    79     private JPopupMenu popupMenu;
    8079
    8180    private ActionListener dblClickListener;
     
    297296        setPreferredSize(new Dimension(400, 300));
    298297        filterPresets();
    299         popupMenu = new JPopupMenu();
     298        JPopupMenu popupMenu = new JPopupMenu();
    300299        popupMenu.add(new AbstractAction(tr("Add toolbar button")) {
    301300            @Override
     
    435434        init();
    436435    }
    437 
    438436   
    439437    public void clearSelection() {
  • trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java

    r6362 r6883  
    3333 */
    3434public abstract class AbstractTextComponentValidator implements ActionListener, FocusListener, DocumentListener, PropertyChangeListener{
    35     static final private Border ERROR_BORDER = BorderFactory.createLineBorder(Color.RED, 1);
    36     static final private Color ERROR_BACKGROUND =  new Color(255,224,224);
     35    private static final Border ERROR_BORDER = BorderFactory.createLineBorder(Color.RED, 1);
     36    private static final Color ERROR_BACKGROUND =  new Color(255,224,224);
    3737
    3838    private JTextComponent tc;
  • trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java

    r6380 r6883  
    121121    }
    122122
    123     static private class LatitudeValidator extends AbstractTextComponentValidator {
     123    private static class LatitudeValidator extends AbstractTextComponentValidator {
    124124
    125125        public static void decorate(JTextComponent tc) {
     
    161161    }
    162162
    163     static private class LongitudeValidator extends AbstractTextComponentValidator{
     163    private static class LongitudeValidator extends AbstractTextComponentValidator{
    164164
    165165        public static void decorate(JTextComponent tc) {
  • trunk/src/org/openstreetmap/josm/io/auth/AbstractCredentialsAgent.java

    r6087 r6883  
    1010import org.openstreetmap.josm.gui.util.GuiHelper;
    1111
    12 abstract public class AbstractCredentialsAgent implements CredentialsAgent {
     12public abstract class AbstractCredentialsAgent implements CredentialsAgent {
    1313
    1414    protected Map<RequestorType, PasswordAuthentication> memoryCredentialsCache = new HashMap<RequestorType, PasswordAuthentication>();
  • trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java

    r6349 r6883  
    2727     * @return the single credential agent used in JOSM
    2828     */
    29     static public CredentialsManager getInstance() {
     29    public static CredentialsManager getInstance() {
    3030        if (instance == null) {
    3131            CredentialsAgent delegate;
  • trunk/src/org/openstreetmap/josm/io/imagery/Grabber.java

    r6643 r6883  
    88import org.openstreetmap.josm.gui.layer.WMSLayer;
    99
    10 abstract public class Grabber implements Runnable {
     10public abstract class Grabber implements Runnable {
    1111    protected final MapView mv;
    1212    protected final WMSLayer layer;
     
    2727        return layer.getBaseImageWidth();
    2828    }
     29
    2930    int height(){
    3031        return layer.getBaseImageHeight();
     
    8182    }
    8283
    83     abstract public boolean loadFromCache(WMSRequest request);
     84    public abstract boolean loadFromCache(WMSRequest request);
    8485
    8586    public void cancel() {
    8687        canceled = true;
    8788    }
    88 
    8989}
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java

    r6869 r6883  
    9393     * @return the message
    9494     */
    95     abstract public String getPermissionMessage();
     95    public abstract String getPermissionMessage();
    9696
    9797    /**
     
    105105     * @return the preference name and error message or null
    106106     */
    107     abstract public PermissionPrefWithDefault getPermissionPref();
    108 
    109     abstract public String[] getMandatoryParams();
     107    public abstract PermissionPrefWithDefault getPermissionPref();
     108
     109    public abstract String[] getMandatoryParams();
    110110
    111111    public String[] getOptionalParams() {
     
    137137     * @throws RequestHandlerForbiddenException
    138138     */
    139     final public void checkPermission() throws RequestHandlerForbiddenException
    140     {
     139    public final void checkPermission() throws RequestHandlerForbiddenException {
    141140        /*
    142141         * If the subclass defines a specific preference and if this is set
     
    147146         */
    148147        PermissionPrefWithDefault permissionPref = getPermissionPref();
    149         if((permissionPref != null) && (permissionPref.pref != null))
    150         {
     148        if (permissionPref != null && permissionPref.pref != null) {
    151149            if (!Main.pref.getBoolean(permissionPref.pref, permissionPref.defaultVal)) {
    152150                String err = MessageFormat.format("RemoteControl: ''{0}'' forbidden by preferences", myCommand);
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java

    r6867 r6883  
    9090    }
    9191
    92     @Override protected void cancel() {
     92    @Override
     93    protected void cancel() {
    9394        this.canceled = true;
    9495        synchronized(this) {
     
    99100    }
    100101
    101     @Override protected void finish() {}
     102    @Override
     103    protected void finish() {}
    102104
    103105    protected void download(PluginInformation pi, File file) throws PluginDownloadException{
     
    152154    }
    153155
    154     @Override protected void realRun() throws SAXException, IOException {
     156    @Override
     157    protected void realRun() throws SAXException, IOException {
    155158        File pluginDir = Main.pref.getPluginsDirectory();
    156         if (!pluginDir.exists()) {
    157             if (!pluginDir.mkdirs()) {
    158                 lastException = new PluginDownloadException(tr("Failed to create plugin directory ''{0}''", pluginDir.toString()));
    159                 failed.addAll(toUpdate);
    160                 return;
    161             }
     159        if (!pluginDir.exists() && !pluginDir.mkdirs()) {
     160            lastException = new PluginDownloadException(tr("Failed to create plugin directory ''{0}''", pluginDir.toString()));
     161            failed.addAll(toUpdate);
     162            return;
    162163        }
    163164        getProgressMonitor().setTicksCount(toUpdate.size());
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r6839 r6883  
    7878     * Deprecated plugins that are removed on start
    7979     */
    80     public final static Collection<DeprecatedPlugin> DEPRECATED_PLUGINS;
     80    public static final Collection<DeprecatedPlugin> DEPRECATED_PLUGINS;
    8181    static {
    8282        String IN_CORE = tr("integrated into main program");
     
    195195     * All installed and loaded plugins (resp. their main classes)
    196196     */
    197     public final static Collection<PluginProxy> pluginList = new LinkedList<PluginProxy>();
     197    public static final Collection<PluginProxy> pluginList = new LinkedList<PluginProxy>();
    198198
    199199    /**
     
    10351035            File plugin = new File(filePath.substring(0, filePath.length() - 4));
    10361036            String pluginName = updatedPlugin.getName().substring(0, updatedPlugin.getName().length() - 8);
    1037             if (plugin.exists()) {
    1038                 if (!plugin.delete() && dowarn) {
    1039                     Main.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString()));
    1040                     Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
    1041                     continue;
    1042                 }
     1037            if (plugin.exists() && !plugin.delete() && dowarn) {
     1038                Main.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString()));
     1039                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
     1040                continue;
    10431041            }
    10441042            try {
     
    13241322    }
    13251323
    1326     static private class UpdatePluginsMessagePanel extends JPanel {
     1324    private static class UpdatePluginsMessagePanel extends JPanel {
    13271325        private JMultilineLabel lblMessage;
    13281326        private JCheckBox cbDontShowAgain;
  • trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java

    r6839 r6883  
    325325        try {
    326326            File pluginDir = Main.pref.getPluginsDirectory();
    327             if (!pluginDir.exists()) {
    328                 if (! pluginDir.mkdirs()) {
    329                     Main.warn(tr("Failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.", pluginDir.toString(), site));
    330                 }
     327            if (!pluginDir.exists() && !pluginDir.mkdirs()) {
     328                Main.warn(tr("Failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.", pluginDir.toString(), site));
    331329            }
    332330            File cacheFile = createSiteCacheFile(pluginDir, site, CacheType.PLUGIN_LIST);
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6852 r6883  
    831831        }
    832832        File josmTmpDir = new File(tmpDir, "JOSM");
    833         if (!josmTmpDir.exists()) {
    834             if (!josmTmpDir.mkdirs()) {
    835                 Main.warn("Unable to create temp directory "+josmTmpDir);
    836             }
     833        if (!josmTmpDir.exists() && !josmTmpDir.mkdirs()) {
     834            Main.warn("Unable to create temp directory "+josmTmpDir);
    837835        }
    838836        return josmTmpDir;
Note: See TracChangeset for help on using the changeset viewer.