Ignore:
Timestamp:
2014-02-27T01:41:49+01:00 (10 years ago)
Author:
Don-vip
Message:

fix some Sonar issues (JLS order)

Location:
trunk/src/org/openstreetmap/josm/io
Files:
13 edited

Legend:

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

    r6643 r6889  
    2525     * Common intervals
    2626     */
    27     final static public int INTERVAL_ALWAYS = -1;
    28     final static public int INTERVAL_HOURLY = 60*60;
    29     final static public int INTERVAL_DAILY = INTERVAL_HOURLY * 24;
    30     final static public int INTERVAL_WEEKLY = INTERVAL_DAILY * 7;
    31     final static public int INTERVAL_MONTHLY = INTERVAL_WEEKLY * 4;
    32     final static public int INTERVAL_NEVER = Integer.MAX_VALUE;
     27    public static final int INTERVAL_ALWAYS = -1;
     28    public static final int INTERVAL_HOURLY = 60*60;
     29    public static final int INTERVAL_DAILY = INTERVAL_HOURLY * 24;
     30    public static final int INTERVAL_WEEKLY = INTERVAL_DAILY * 7;
     31    public static final int INTERVAL_MONTHLY = INTERVAL_WEEKLY * 4;
     32    public static final int INTERVAL_NEVER = Integer.MAX_VALUE;
    3333
    3434    /**
     
    4040     * The ident that identifies the stored file. Includes file-ending.
    4141     */
    42     final private String ident;
     42    private final String ident;
    4343
    4444    /**
    4545     * The (file-)path where the data will be stored
    4646     */
    47     final private File path;
     47    private final File path;
    4848
    4949    /**
    5050     * How often to update the cached version
    5151     */
    52     final private int updateInterval;
     52    private final int updateInterval;
    5353
    5454    /**
  • trunk/src/org/openstreetmap/josm/io/CacheFiles.java

    r6248 r6889  
    2929     * Common expirey dates
    3030     */
    31     final static public int EXPIRE_NEVER = -1;
    32     final static public int EXPIRE_DAILY = 60 * 60 * 24;
    33     final static public int EXPIRE_WEEKLY = EXPIRE_DAILY * 7;
    34     final static public int EXPIRE_MONTHLY = EXPIRE_WEEKLY * 4;
    35 
    36     final private File dir;
    37     final private String ident;
    38     final private boolean enabled;
     31    public static final int EXPIRE_NEVER = -1;
     32    public static final int EXPIRE_DAILY = 60 * 60 * 24;
     33    public static final int EXPIRE_WEEKLY = EXPIRE_DAILY * 7;
     34    public static final int EXPIRE_MONTHLY = EXPIRE_WEEKLY * 4;
     35
     36    private final File dir;
     37    private final String ident;
     38    private final boolean enabled;
    3939
    4040    private long expire;  // in seconds
     
    273273    }
    274274
    275     final static public int CLEAN_ALL = 0;
    276     final static public int CLEAN_SMALL_FILES = 1;
    277     final static public int CLEAN_BY_DATE = 2;
     275    public static final int CLEAN_ALL = 0;
     276    public static final int CLEAN_SMALL_FILES = 1;
     277    public static final int CLEAN_BY_DATE = 2;
     278
    278279    /**
    279280     * Performs a non-default, specified clean up
  • trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java

    r6643 r6889  
    3131     * that a changeset was closed
    3232     */
    33     final static public String ERROR_HEADER_PATTERN = "The changeset (\\d+) was closed at (.*)";
     33    public static final String ERROR_HEADER_PATTERN = "The changeset (\\d+) was closed at (.*)";
    3434
    3535    public static enum Source {
     
    5757     * @return true if <code>errorHeader</code> matches with {@link #ERROR_HEADER_PATTERN}
    5858     */
    59     static public boolean errorHeaderMatchesPattern(String errorHeader) {
     59    public static boolean errorHeaderMatchesPattern(String errorHeader) {
    6060        if (errorHeader == null)
    6161            return false;
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r6830 r6889  
    3636     *
    3737     */
    38     static public ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{
     38    public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{
    3939        return new ChangesetQueryUrlParser().parse(query);
    4040    }
  • trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java

    r6380 r6889  
    3232public class DiffResultProcessor  {
    3333
    34     static private class DiffResultEntry {
     34    private static class DiffResultEntry {
    3535        public long new_id;
    3636        public int new_version;
  • trunk/src/org/openstreetmap/josm/io/GpxExporter.java

    r6815 r6889  
    3939
    4040public class GpxExporter extends FileExporter implements GpxConstants {
    41     private final static String warningGpl = "<html><font color='red' size='-2'>"
     41    private static final String warningGpl = "<html><font color='red' size='-2'>"
    4242        + tr("Note: GPL is not compatible with the OSM license. Do not upload GPL licensed tracks.") + "</html>";
    4343
  • trunk/src/org/openstreetmap/josm/io/GpxWriter.java

    r6552 r6889  
    4141    private String indent = "";
    4242
    43     private final static int WAY_POINT = 0;
    44     private final static int ROUTE_POINT = 1;
    45     private final static int TRACK_POINT = 2;
     43    private static final int WAY_POINT = 0;
     44    private static final int ROUTE_POINT = 1;
     45    private static final int TRACK_POINT = 2;
    4646
    4747    public void write(GpxData data) {
  • trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java

    r6867 r6889  
    3434    File file = null;
    3535
    36     public final static long DEFAULT_MAXTIME = -1L;
     36    public static final long DEFAULT_MAXTIME = -1L;
    3737
    3838    /**
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r6822 r6889  
    132132    public GpxData data;
    133133
    134     //  private final static SimpleDateFormat GGATIMEFMT =
     134    //  private static final SimpleDateFormat GGATIMEFMT =
    135135    //      new SimpleDateFormat("HHmmss.SSS");
    136     private final static SimpleDateFormat RMCTIMEFMT =
     136    private static final SimpleDateFormat RMCTIMEFMT =
    137137        new SimpleDateFormat("ddMMyyHHmmss.SSS");
    138     private final static SimpleDateFormat RMCTIMEFMTSTD =
     138    private static final SimpleDateFormat RMCTIMEFMTSTD =
    139139        new SimpleDateFormat("ddMMyyHHmmss");
    140140
    141     private Date readTime(String p)
    142     {
     141    private Date readTime(String p) {
    143142        Date d = RMCTIMEFMT.parse(p, new ParsePosition(0));
    144143        if (d == null) {
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r6875 r6889  
    5959     * Maximum number of retries to send a request in case of HTTP 500 errors or timeouts
    6060     */
    61     static public final int DEFAULT_MAX_NUM_RETRIES = 5;
     61    public static final int DEFAULT_MAX_NUM_RETRIES = 5;
    6262
    6363    /**
     
    6767     * @since 5386
    6868     */
    69     static public final int MAX_DOWNLOAD_THREADS = 2;
     69    public static final int MAX_DOWNLOAD_THREADS = 2;
    7070
    7171    /**
     
    7373     * @since 5422
    7474     */
    75     static public final String DEFAULT_API_URL = "http://api.openstreetmap.org/api";
     75    public static final String DEFAULT_API_URL = "http://api.openstreetmap.org/api";
    7676
    7777    // The collection of instantiated OSM APIs
     
    8888     *
    8989     */
    90     static public OsmApi getOsmApi(String serverUrl) {
     90    public static OsmApi getOsmApi(String serverUrl) {
    9191        OsmApi api = instances.get(serverUrl);
    9292        if (api == null) {
     
    102102     * @return the OsmApi
    103103     */
    104     static public OsmApi getOsmApi() {
     104    public static OsmApi getOsmApi() {
    105105        String serverUrl = Main.pref.get("osm-server.url", DEFAULT_API_URL);
    106106        return getOsmApi(serverUrl);
  • trunk/src/org/openstreetmap/josm/io/OsmApiPrimitiveGoneException.java

    r3083 r6889  
    1717     * The regexp pattern for the error header replied by the OSM API
    1818     */
    19     static public final String ERROR_HEADER_PATTERN = "The (\\S+) with the id (\\d+) has already been deleted";
     19    public static final String ERROR_HEADER_PATTERN = "The (\\S+) with the id (\\d+) has already been deleted";
    2020    /** the type of the primitive which is gone on the server */
    2121    private OsmPrimitiveType type;
  • trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java

    r6009 r6889  
    1818 */
    1919public class OsmChangeBuilder {
    20     static public final String DEFAULT_API_VERSION = "0.6";
     20    public static final String DEFAULT_API_VERSION = "0.6";
    2121
    2222    private String currentMode;
  • trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java

    r6695 r6889  
    2525public class OsmServerUserInfoReader extends OsmServerReader {
    2626
    27     static protected String getAttribute(Node node, String name) {
     27    protected static String getAttribute(Node node, String name) {
    2828        return node.getAttributes().getNamedItem(name).getNodeValue();
    2929    }
     
    3535     * @throws OsmDataParsingException if parsing goes wrong
    3636     */
    37     static public UserInfo buildFromXML(Document document) throws OsmDataParsingException {
     37    public static UserInfo buildFromXML(Document document) throws OsmDataParsingException {
    3838        try {
    3939            XPathFactory factory = XPathFactory.newInstance();
Note: See TracChangeset for help on using the changeset viewer.