diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java index feda25cbade14..dccb19214baec 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.stream.Collectors; import java.util.stream.Stream; import io.quarkus.deployment.annotations.BuildProducer; @@ -46,8 +45,8 @@ public void set(List setCPItems, } } - String classPathValue = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString()) - .collect(Collectors.joining(":")); - recorder.set(classPathValue); + List allJarPaths = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString()) + .toList(); + recorder.set(allJarPaths); } } diff --git a/core/runtime/src/main/java/io/quarkus/runtime/ClassPathSystemPropertyRecorder.java b/core/runtime/src/main/java/io/quarkus/runtime/ClassPathSystemPropertyRecorder.java index fdca4fcb0cb65..c5f17f4b8d0f6 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/ClassPathSystemPropertyRecorder.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/ClassPathSystemPropertyRecorder.java @@ -1,11 +1,13 @@ package io.quarkus.runtime; +import java.util.List; + import io.quarkus.runtime.annotations.Recorder; @Recorder public class ClassPathSystemPropertyRecorder { - public void set(String value) { - System.setProperty("java.class.path", value); + public void set(List allJarPaths) { + System.setProperty("java.class.path", String.join(":", allJarPaths)); } }