Skip to content

Commit e9093d3

Browse files
committed
Split testOnlyPathString at File.pathSeparator
1 parent a846c50 commit e9093d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/framework/src/main/java/org/elasticsearch/entitlement/bootstrap/TestEntitlementBootstrap.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.elasticsearch.logging.Logger;
2626
import org.elasticsearch.plugins.PluginDescriptor;
2727

28+
import java.io.File;
2829
import java.io.IOException;
2930
import java.io.InputStream;
3031
import java.net.URL;
@@ -116,7 +117,7 @@ private static TestPolicyManager createPolicyManager(PathLookup pathLookup) thro
116117
if (classPathProperty == null) {
117118
classPathEntries = Set.of();
118119
} else {
119-
classPathEntries = Arrays.stream(classPathProperty.split(":")).map(Path::of).collect(toCollection(TreeSet::new));
120+
classPathEntries = Arrays.stream(classPathProperty.split(File.pathSeparator)).map(Path::of).collect(toCollection(TreeSet::new));
120121
}
121122
Map<String, Collection<Path>> pluginSourcePaths = pluginNames.stream().collect(toMap(n -> n, n -> classPathEntries));
122123

@@ -127,7 +128,7 @@ private static TestPolicyManager createPolicyManager(PathLookup pathLookup) thro
127128
if (testOnlyPathString == null) {
128129
testOnlyClassPath = Set.of();
129130
} else {
130-
testOnlyClassPath = Arrays.stream(testOnlyPathString.split(":")).collect(toCollection(TreeSet::new));
131+
testOnlyClassPath = Arrays.stream(testOnlyPathString.split(File.pathSeparator)).collect(toCollection(TreeSet::new));
131132
}
132133

133134
return new TestPolicyManager(

0 commit comments

Comments
 (0)