summaryrefslogtreecommitdiff
path: root/src/test/java/org/javacs/BenchmarkPruner.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/javacs/BenchmarkPruner.java')
-rw-r--r--src/test/java/org/javacs/BenchmarkPruner.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/java/org/javacs/BenchmarkPruner.java b/src/test/java/org/javacs/BenchmarkPruner.java
index 9ad432a..56922a5 100644
--- a/src/test/java/org/javacs/BenchmarkPruner.java
+++ b/src/test/java/org/javacs/BenchmarkPruner.java
@@ -24,11 +24,12 @@ public class BenchmarkPruner {
while (it.hasNext()) {
var file = it.next();
if (!Files.isRegularFile(file)) continue;
- var contents = String.join("\n", Files.readAllLines(file));
if (prune) {
- contents = Pruner.prune(file.toUri(), contents, "isWord");
+ var contents = Pruner.prune(file.toUri(), "isWord");
+ files.add(new SourceFileObject(file, contents));
+ } else {
+ files.add(new SourceFileObject(file));
}
- files.add(new SourceFileObject(file, contents));
}
return files;
} catch (IOException e) {