equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.tools.javac.file; |
26 package com.sun.tools.javac.file; |
27 |
27 |
|
28 import java.io.IOError; |
28 import java.io.IOException; |
29 import java.io.IOException; |
29 import java.nio.file.FileSystems; |
30 import java.nio.file.FileSystems; |
30 import java.nio.file.Files; |
31 import java.nio.file.Files; |
|
32 import java.nio.file.InvalidPathException; |
31 import java.nio.file.Path; |
33 import java.nio.file.Path; |
32 import java.nio.file.spi.FileSystemProvider; |
34 import java.nio.file.spi.FileSystemProvider; |
33 import java.util.ArrayList; |
35 import java.util.ArrayList; |
34 import java.util.Collections; |
36 import java.util.Collections; |
35 import java.util.List; |
37 import java.util.List; |
107 List<Path> list = new ArrayList<>(); |
109 List<Path> list = new ArrayList<>(); |
108 |
110 |
109 for (StringTokenizer st = new StringTokenizer(path); |
111 for (StringTokenizer st = new StringTokenizer(path); |
110 st.hasMoreTokens(); ) { |
112 st.hasMoreTokens(); ) { |
111 String elt = st.nextToken(); |
113 String elt = st.nextToken(); |
112 Path f = FileSystems.getDefault().getPath(elt); |
114 try { |
113 if (!f.isAbsolute() && parent != null) |
115 Path f = FileSystems.getDefault().getPath(elt); |
114 f = parent.resolve(f).toAbsolutePath(); |
116 if (!f.isAbsolute() && parent != null) |
115 list.add(f); |
117 f = parent.resolve(f).toAbsolutePath(); |
|
118 list.add(f); |
|
119 } catch (InvalidPathException | IOError e) { |
|
120 throw new IOException(e); |
|
121 } |
116 } |
122 } |
117 |
123 |
118 return list; |
124 return list; |
119 } |
125 } |
120 } |
126 } |