Changeset 26835 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
- Timestamp:
- 2011-10-12T00:39:26+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
r26228 r26835 140 140 public boolean loadCache(File file, int currentLambertZone) { 141 141 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); 145 147 successfulRead = wmsLayer.read(ois, currentLambertZone); 146 ois.close();147 fis.close();148 148 } catch (Exception ex) { 149 149 ex.printStackTrace(System.out); 150 150 JOptionPane.showMessageDialog(Main.parent, tr("Error loading file.\nProbably an old version of the cache file."), tr("Error"), JOptionPane.ERROR_MESSAGE); 151 151 return false; 152 } finally { 153 try { 154 ois.close(); 155 fis.close(); 156 } catch (Exception e) { 157 e.printStackTrace(); 158 } 152 159 } 153 160 if (successfulRead && wmsLayer.isRaster()) {
Note:
See TracChangeset
for help on using the changeset viewer.
