Changeset 25833 in osm for applications/editors/josm


Ignore:
Timestamp:
2011-04-12T22:27:07+02:00 (14 years ago)
Author:
glebius
Message:

Declare string constants as 'static final'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java

    r25791 r25833  
    2222
    2323public class LiveGpsAcquirer implements Runnable {
     24    private static final String DEFAULT_HOST = "localhost";
     25    private static final int DEFAULT_PORT = 2947;
     26    private static final String C_HOST = "livegps.gpsd.host";
     27    private static final String C_PORT = "livegps.gpsd.port";
    2428    private String gpsdHost;
    2529    private int gpsdPort;
     
    4145        super();
    4246
    43         gpsdHost = Main.pref.get("livegps.gpsd.host", "localhost");
    44         gpsdPort = Main.pref.getInteger("livegps.gpsd.port", 2947);
     47        gpsdHost = Main.pref.get(C_HOST, DEFAULT_HOST);
     48        gpsdPort = Main.pref.getInteger(C_PORT, DEFAULT_PORT);
    4549        // put the settings back in to the preferences, makes keys appear.
    46         Main.pref.put("livegps.gpsd.host", gpsdHost);
    47         Main.pref.putInteger("livegps.gpsd.port", gpsdPort);
     50        Main.pref.put(C_HOST, gpsdHost);
     51        Main.pref.putInteger(C_PORT, gpsdPort);
    4852    }
    4953
Note: See TracChangeset for help on using the changeset viewer.