YARN-10978. Fix ApplicationClassLoader to Correctly Expand Glob for Windows Path (#3558)

This commit is contained in:
Akshat Bordia 2022-12-06 16:39:49 +05:30 committed by GitHub
parent dadd3d9138
commit 86ac1ad9e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,7 +108,7 @@ static URL[] constructUrlsFromClasspath(String classpath)
throws MalformedURLException {
List<URL> urls = new ArrayList<URL>();
for (String element : classpath.split(File.pathSeparator)) {
if (element.endsWith("/*")) {
if (element.endsWith(File.separator + "*")) {
List<Path> jars = FileUtil.getJarsInDirectory(element);
if (!jars.isEmpty()) {
for (Path jar: jars) {