Skip to content

Commit 6af2c77

Browse files
geoandgsmet
authored andcommitted
Overcome 'String too large to record' issue with Truffle
This is better than the current state, but it is not yet the absolutely correct Relates: quarkusio#39387 (cherry picked from commit 56bbb39)
1 parent ca69c0e commit 6af2c77

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import java.util.ArrayList;
55
import java.util.Collection;
66
import java.util.List;
7-
import java.util.stream.Collectors;
87
import java.util.stream.Stream;
98

109
import io.quarkus.deployment.annotations.BuildProducer;
@@ -46,8 +45,8 @@ public void set(List<SetClassPathSystemPropBuildItem> setCPItems,
4645

4746
}
4847
}
49-
String classPathValue = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString())
50-
.collect(Collectors.joining(":"));
51-
recorder.set(classPathValue);
48+
List<String> allJarPaths = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString())
49+
.toList();
50+
recorder.set(allJarPaths);
5251
}
5352
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package io.quarkus.runtime;
22

3+
import java.util.List;
4+
35
import io.quarkus.runtime.annotations.Recorder;
46

57
@Recorder
68
public class ClassPathSystemPropertyRecorder {
79

8-
public void set(String value) {
9-
System.setProperty("java.class.path", value);
10+
public void set(List<String> allJarPaths) {
11+
System.setProperty("java.class.path", String.join(":", allJarPaths));
1012
}
1113
}

0 commit comments

Comments
 (0)