Skip to content

Commit

Permalink
Overcome 'String too large to record' issue with Truffle
Browse files Browse the repository at this point in the history
This is better than the current state, but it is not
yet the absolutely correct

Relates: quarkusio#39387
(cherry picked from commit 56bbb39)
  • Loading branch information
geoand authored and gsmet committed Jun 4, 2024
1 parent ca69c0e commit 6af2c77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -46,8 +45,8 @@ public void set(List<SetClassPathSystemPropBuildItem> setCPItems,

}
}
String classPathValue = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString())
.collect(Collectors.joining(":"));
recorder.set(classPathValue);
List<String> allJarPaths = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString())
.toList();
recorder.set(allJarPaths);
}
}
Original file line number Diff line number Diff line change
@@ -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<String> allJarPaths) {
System.setProperty("java.class.path", String.join(":", allJarPaths));
}
}

0 comments on commit 6af2c77

Please sign in to comment.