Changeset 13838 in josm for trunk/src/org
- Timestamp:
- 2018-05-26T02:47:41+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r13647 r13838 9 9 import java.lang.ref.WeakReference; 10 10 import java.net.URL; 11 import java.nio.file.InvalidPathException; 11 12 import java.util.Collection; 12 13 import java.util.Collections; … … 347 348 try { 348 349 pref.saveDefaults(); 349 } catch (IOException ex) {350 } catch (IOException | InvalidPathException ex) { 350 351 Logging.log(Logging.LEVEL_WARN, tr("Failed to save default preferences."), ex); 351 352 } -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r13769 r13838 14 14 import java.io.StringWriter; 15 15 import java.nio.charset.StandardCharsets; 16 import java.nio.file.InvalidPathException; 16 17 import java.util.ArrayList; 17 18 import java.util.Collection; … … 594 595 save(); 595 596 } 596 } catch (IOException e) {597 } catch (IOException | InvalidPathException e) { 597 598 Logging.error(e); 598 599 if (!GraphicsEnvironment.isHeadless()) { … … 698 699 try { 699 700 save(); 700 } catch (IOException e) {701 } catch (IOException | InvalidPathException e) { 701 702 File file = getPreferenceFile(); 702 703 try { -
trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxExporter.java
r12854 r13838 11 11 import java.io.IOException; 12 12 import java.io.OutputStream; 13 import java.nio.file.InvalidPathException; 13 14 import java.text.MessageFormat; 14 15 import java.time.Year; … … 209 210 new GpxWriter(fo).write(gpxData); 210 211 fo.flush(); 211 } catch (IOException ex) {212 } catch (IOException | InvalidPathException ex) { 212 213 Logging.error(ex); 213 214 JOptionPane.showMessageDialog(Main.parent, tr("Error while exporting {0}:\n{1}", fn, ex.getMessage()), -
trunk/src/org/openstreetmap/josm/gui/io/importexport/OsmExporter.java
r13352 r13838 11 11 import java.io.Writer; 12 12 import java.nio.charset.StandardCharsets; 13 import java.nio.file.InvalidPathException; 13 14 import java.text.MessageFormat; 14 15 … … 95 96 } 96 97 layer.onPostSaveToFile(); 97 } catch (IOException e) {98 } catch (IOException | InvalidPathException e) { 98 99 Logging.error(e); 99 100 JOptionPane.showMessageDialog( … … 110 111 Utils.copyFile(tmpFile, file); 111 112 } 112 } catch (IOException e2) {113 } catch (IOException | InvalidPathException e2) { 113 114 Logging.error(e2); 114 115 JOptionPane.showMessageDialog( -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r13761 r13838 10 10 import java.io.File; 11 11 import java.io.IOException; 12 import java.nio.file.InvalidPathException; 12 13 import java.util.ArrayList; 13 14 import java.util.Collections; … … 341 342 try { 342 343 Main.pref.save(); 343 } catch (IOException e) {344 Logging.log(Logging.LEVEL_WARN, " IOException while saving preferences:", e);344 } catch (IOException | InvalidPathException e) { 345 Logging.log(Logging.LEVEL_WARN, "Exception while saving preferences:", e); 345 346 } 346 347 readPreferences(Main.pref); -
trunk/src/org/openstreetmap/josm/io/Compression.java
r13350 r13838 8 8 import java.nio.charset.StandardCharsets; 9 9 import java.nio.file.Files; 10 import java.nio.file.InvalidPathException; 10 11 import java.util.zip.GZIPInputStream; 11 12 import java.util.zip.GZIPOutputStream; … … 213 214 * 214 215 * @throws IOException if any I/O error occurs 216 * @throws InvalidPathException if a Path object cannot be constructed from the abstract path 215 217 */ 216 218 public static OutputStream getCompressedFileOutputStream(File file) throws IOException { -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r13836 r13838 24 24 import java.nio.charset.StandardCharsets; 25 25 import java.nio.file.Files; 26 import java.nio.file.InvalidPathException; 26 27 import java.nio.file.Path; 27 28 import java.nio.file.Paths; … … 392 393 * @throws IOException if any I/O error occurs 393 394 * @throws IllegalArgumentException if {@code in} or {@code out} is {@code null} 395 * @throws InvalidPathException if a Path object cannot be constructed from the abstract path 394 396 * @since 7003 395 397 */
Note:
See TracChangeset
for help on using the changeset viewer.