Ignore:
Timestamp:
2010-02-15T09:03:57+01:00 (12 years ago)
Author:
jttt
Message:

Fix some eclipse warnings

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

Legend:

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

    r2986 r2990  
    4343
    4444    // If the cache is full, we don't want to delete just one file
    45     private static final int cleanUpThreshold = 20;
     45    private static final int CLEANUP_TRESHOLD = 20;
    4646    // We don't want to clean after every file-write
    47     private static final int cleanUpInterval = 5;
     47    private static final int CLEANUP_INTERVAL = 5;
    4848    // Stores how many files have been written
    4949    private int writes = 0;
     
    221221     */
    222222    public void checkCleanUp() {
    223         if(this.writes > this.cleanUpInterval) {
     223        if(this.writes > CLEANUP_INTERVAL) {
    224224            cleanUp();
    225225        }
     
    254254
    255255            // Delete a couple of files, then check again
    256             if(i % cleanUpThreshold == 0 && getDirSize() < maxsize)
     256            if(i % CLEANUP_TRESHOLD == 0 && getDirSize() < maxsize)
    257257                return;
    258258        }
  • trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java

    r2852 r2990  
    2424 */
    2525public class DefaultProxySelector extends ProxySelector {
     26    @SuppressWarnings("unused")
    2627    static private final Logger logger = Logger.getLogger(DefaultProxySelector.class.getName());
    2728
  • trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java

    r2889 r2990  
    7272        try {
    7373            if(file != null && (file.getName().endsWith(".zip")
    74             || file.getName().endsWith(".ZIP")))
     74                    || file.getName().endsWith(".ZIP")))
    7575            {
    7676                ZipFile zipFile = new ZipFile(file);
    7777                ZipEntry resentry = null;
    78                 Enumeration entries = zipFile.entries();
     78                Enumeration<? extends ZipEntry> entries = zipFile.entries();
    7979                while(entries.hasMoreElements()) {
    80                     ZipEntry entry = (ZipEntry)entries.nextElement();
     80                    ZipEntry entry = entries.nextElement();
    8181                    if(entry.getName().endsWith("."+extension)) {
    8282                        /* choose any file with correct extension. When more than
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r2852 r2990  
    5050 */
    5151public class OsmApi extends OsmConnection {
     52    @SuppressWarnings("unused")
    5253    static private final Logger logger = Logger.getLogger(OsmApi.class.getName());
    5354    /** max number of retries to send a request in case of HTTP 500 errors or timeouts */
  • trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java

    r2852 r2990  
    135135                throwException(tr("Missing mandatory attribute ''{0}''.", name));
    136136            }
    137             if (v.equals("true")) return true;
    138             if (v.equals("false")) return false;
     137            if ("true".equals(v)) return true;
     138            if ("false".equals(v)) return false;
    139139            throwException(tr("Illegal value for mandatory attribute ''{0}'' of type boolean. Got ''{1}''.", name, v));
    140140            // not reached
  • trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java

    r2955 r2990  
    3939 */
    4040public class OsmChangesetParser {
     41    @SuppressWarnings("unused")
    4142    static private final Logger logger = Logger.getLogger(OsmChangesetParser.class.getName());
    4243
  • trunk/src/org/openstreetmap/josm/io/OsmConnection.java

    r2862 r2990  
    3131 */
    3232public class OsmConnection {
     33    @SuppressWarnings("unused")
    3334    private static final Logger logger = Logger.getLogger(OsmConnection.class.getName());
    3435
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r2852 r2990  
    2929 */
    3030public abstract class OsmServerReader extends OsmConnection {
     31    @SuppressWarnings("unused")
    3132    static private final Logger logger = Logger.getLogger(OsmServerReader.class.getName());
    3233    private OsmApi api = OsmApi.getOsmApi();
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r2852 r2990  
    2929 */
    3030public class OsmServerWriter {
     31    @SuppressWarnings("unused")
    3132    static private final Logger logger = Logger.getLogger(OsmServerWriter.class.getName());
    3233
  • trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java

    r2801 r2990  
    1717 */
    1818public  class DefaultAuthenticator extends Authenticator {
     19    @SuppressWarnings("unused")
    1920    private static final Logger logger = Logger.getLogger(DefaultAuthenticator.class.getName());
    2021    private static DefaultAuthenticator instance;
Note: See TracChangeset for help on using the changeset viewer.