Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 13837)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 13838)
@@ -9,4 +9,5 @@
 import java.lang.ref.WeakReference;
 import java.net.URL;
+import java.nio.file.InvalidPathException;
 import java.util.Collection;
 import java.util.Collections;
@@ -347,5 +348,5 @@
         try {
             pref.saveDefaults();
-        } catch (IOException ex) {
+        } catch (IOException | InvalidPathException ex) {
             Logging.log(Logging.LEVEL_WARN, tr("Failed to save default preferences."), ex);
         }
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 13837)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 13838)
@@ -14,4 +14,5 @@
 import java.io.StringWriter;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.InvalidPathException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -594,5 +595,5 @@
                 save();
             }
-        } catch (IOException e) {
+        } catch (IOException | InvalidPathException e) {
             Logging.error(e);
             if (!GraphicsEnvironment.isHeadless()) {
@@ -698,5 +699,5 @@
                 try {
                     save();
-                } catch (IOException e) {
+                } catch (IOException | InvalidPathException e) {
                     File file = getPreferenceFile();
                     try {
Index: /trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxExporter.java	(revision 13837)
+++ /trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxExporter.java	(revision 13838)
@@ -11,4 +11,5 @@
 import java.io.IOException;
 import java.io.OutputStream;
+import java.nio.file.InvalidPathException;
 import java.text.MessageFormat;
 import java.time.Year;
@@ -209,5 +210,5 @@
             new GpxWriter(fo).write(gpxData);
             fo.flush();
-        } catch (IOException ex) {
+        } catch (IOException | InvalidPathException ex) {
             Logging.error(ex);
             JOptionPane.showMessageDialog(Main.parent, tr("Error while exporting {0}:\n{1}", fn, ex.getMessage()),
Index: /trunk/src/org/openstreetmap/josm/gui/io/importexport/OsmExporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/importexport/OsmExporter.java	(revision 13837)
+++ /trunk/src/org/openstreetmap/josm/gui/io/importexport/OsmExporter.java	(revision 13838)
@@ -11,4 +11,5 @@
 import java.io.Writer;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.InvalidPathException;
 import java.text.MessageFormat;
 
@@ -95,5 +96,5 @@
             }
             layer.onPostSaveToFile();
-        } catch (IOException e) {
+        } catch (IOException | InvalidPathException e) {
             Logging.error(e);
             JOptionPane.showMessageDialog(
@@ -110,5 +111,5 @@
                     Utils.copyFile(tmpFile, file);
                 }
-            } catch (IOException e2) {
+            } catch (IOException | InvalidPathException e2) {
                 Logging.error(e2);
                 JOptionPane.showMessageDialog(
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 13837)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 13838)
@@ -10,4 +10,5 @@
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.InvalidPathException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -341,6 +342,6 @@
                     try {
                         Main.pref.save();
-                    } catch (IOException e) {
-                        Logging.log(Logging.LEVEL_WARN, "IOException while saving preferences:", e);
+                    } catch (IOException | InvalidPathException e) {
+                        Logging.log(Logging.LEVEL_WARN, "Exception while saving preferences:", e);
                     }
                     readPreferences(Main.pref);
Index: /trunk/src/org/openstreetmap/josm/io/Compression.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 13837)
+++ /trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 13838)
@@ -8,4 +8,5 @@
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
@@ -213,4 +214,5 @@
      *
      * @throws IOException if any I/O error occurs
+     * @throws InvalidPathException if a Path object cannot be constructed from the abstract path
      */
     public static OutputStream getCompressedFileOutputStream(File file) throws IOException {
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 13837)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 13838)
@@ -24,4 +24,5 @@
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -392,4 +393,5 @@
      * @throws IOException if any I/O error occurs
      * @throws IllegalArgumentException if {@code in} or {@code out} is {@code null}
+     * @throws InvalidPathException if a Path object cannot be constructed from the abstract path
      * @since 7003
      */
