YARN-10978. Fix ApplicationClassLoader to Correctly Expand Glob for Windows Path (#3558)
This commit is contained in:
parent
dadd3d9138
commit
86ac1ad9e5
@ -108,7 +108,7 @@ static URL[] constructUrlsFromClasspath(String classpath)
|
|||||||
throws MalformedURLException {
|
throws MalformedURLException {
|
||||||
List<URL> urls = new ArrayList<URL>();
|
List<URL> urls = new ArrayList<URL>();
|
||||||
for (String element : classpath.split(File.pathSeparator)) {
|
for (String element : classpath.split(File.pathSeparator)) {
|
||||||
if (element.endsWith("/*")) {
|
if (element.endsWith(File.separator + "*")) {
|
||||||
List<Path> jars = FileUtil.getJarsInDirectory(element);
|
List<Path> jars = FileUtil.getJarsInDirectory(element);
|
||||||
if (!jars.isEmpty()) {
|
if (!jars.isEmpty()) {
|
||||||
for (Path jar: jars) {
|
for (Path jar: jars) {
|
||||||
|
Loading…
Reference in New Issue
Block a user