Ignore:
Timestamp:
2010-06-08T21:56:38+02:00 (14 years ago)
Author:
jttt
Message:

Validate tagging presets when they're added in Preferences dialog

File:
1 edited

Legend:

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

    r3083 r3321  
    7272     * than one files have this extension, the last file whose name includes <code>namepart</code>
    7373     * is opened.
    74      * 
     74     *
    7575     * @param extension  the extension of the file we're looking for
    7676     * @param namepart the name part
     
    104104            if(file.getName().endsWith(".zip")) {
    105105                System.err.println(tr("Warning: failed to open file with extension ''{2}'' and namepart ''{3}'' in zip file ''{0}''. Exception was: {1}",
    106                 file.getName(), e.toString(), extension, namepart));
     106                        file.getName(), e.toString(), extension, namepart));
    107107            }
    108108        }
     
    140140    }
    141141
    142     private File checkLocal(URL url, String destDir, long maxTime) {
     142    private File checkLocal(URL url, String destDir, long maxTime) throws IOException {
    143143        String localPath = Main.pref.get("mirror." + url);
    144144        File file = null;
     
    171171            URLConnection conn = url.openConnection();
    172172            conn.setConnectTimeout(5000);
     173            conn.setReadTimeout(5000);
    173174            bis = new BufferedInputStream(conn.getInputStream());
    174175            bos = new BufferedOutputStream( new FileOutputStream(destDirFile));
     
    178179                bos.write(buffer, 0, length);
    179180            }
    180         } catch(IOException ioe) {
    181             if (file != null)
    182                 return file;
    183             return null;
    184181        } finally {
    185182            if (bis != null) {
Note: See TracChangeset for help on using the changeset viewer.