src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java
changeset 59229 fba8fa613d1a
parent 47216 71c04702a3d5
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java	Fri Nov 22 17:53:09 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java	Fri Nov 22 10:38:35 2019 -0800
@@ -25,9 +25,11 @@
 
 package com.sun.tools.javac.file;
 
+import java.io.IOError;
 import java.io.IOException;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
+import java.nio.file.InvalidPathException;
 import java.nio.file.Path;
 import java.nio.file.spi.FileSystemProvider;
 import java.util.ArrayList;
@@ -109,10 +111,14 @@
             for (StringTokenizer st = new StringTokenizer(path);
                  st.hasMoreTokens(); ) {
                 String elt = st.nextToken();
-                Path f = FileSystems.getDefault().getPath(elt);
-                if (!f.isAbsolute() && parent != null)
-                    f = parent.resolve(f).toAbsolutePath();
-                list.add(f);
+                try {
+                    Path f = FileSystems.getDefault().getPath(elt);
+                    if (!f.isAbsolute() && parent != null)
+                        f = parent.resolve(f).toAbsolutePath();
+                    list.add(f);
+                } catch (InvalidPathException | IOError e) {
+                    throw new IOException(e);
+                }
             }
 
             return list;