Ignore:
Timestamp:
2011-10-12T00:39:26+02:00 (14 years ago)
Author:
pieren
Message:

Fixed issues with new offset in grabbing vector images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java

    r26228 r26835  
    140140    public boolean loadCache(File file, int currentLambertZone) {
    141141        boolean successfulRead = false;
    142         try {
    143             FileInputStream fis = new FileInputStream(file);
    144             ObjectInputStream ois = new ObjectInputStream(fis);
     142        FileInputStream fis = null;
     143        ObjectInputStream ois = null;
     144        try {
     145            fis = new FileInputStream(file);
     146            ois = new ObjectInputStream(fis);
    145147            successfulRead = wmsLayer.read(ois, currentLambertZone);
    146             ois.close();
    147             fis.close();
    148148        } catch (Exception ex) {
    149149            ex.printStackTrace(System.out);
    150150            JOptionPane.showMessageDialog(Main.parent, tr("Error loading file.\nProbably an old version of the cache file."), tr("Error"), JOptionPane.ERROR_MESSAGE);
    151151            return false;
     152        } finally {
     153            try {
     154                ois.close();
     155                fis.close();
     156            } catch (Exception e) {
     157                e.printStackTrace();
     158            }
    152159        }
    153160        if (successfulRead && wmsLayer.isRaster()) {
Note: See TracChangeset for help on using the changeset viewer.