equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
32 import java.lang.module.ModuleFinder; |
32 import java.lang.module.ModuleFinder; |
33 import java.lang.module.ModuleReference; |
33 import java.lang.module.ModuleReference; |
34 import java.lang.module.ResolvedModule; |
34 import java.lang.module.ResolvedModule; |
35 import java.net.URI; |
35 import java.net.URI; |
36 import java.nio.file.Path; |
36 import java.nio.file.Path; |
37 import java.nio.file.Paths; |
|
38 import java.util.ArrayList; |
37 import java.util.ArrayList; |
39 import java.util.Collections; |
38 import java.util.Collections; |
40 import java.util.HashMap; |
39 import java.util.HashMap; |
41 import java.util.HashSet; |
40 import java.util.HashSet; |
42 import java.util.Iterator; |
41 import java.util.Iterator; |
537 } else { |
536 } else { |
538 String[] dirs = s.split(File.pathSeparator); |
537 String[] dirs = s.split(File.pathSeparator); |
539 Path[] paths = new Path[dirs.length]; |
538 Path[] paths = new Path[dirs.length]; |
540 int i = 0; |
539 int i = 0; |
541 for (String dir: dirs) { |
540 for (String dir: dirs) { |
542 paths[i++] = Paths.get(dir); |
541 paths[i++] = Path.of(dir); |
543 } |
542 } |
544 return ModulePath.of(patcher, paths); |
543 return ModulePath.of(patcher, paths); |
545 } |
544 } |
546 } |
545 } |
547 |
546 |