Skip to content

Commit 4fe3f39

Browse files
authored
Merge pull request #50 from IBM/incremental-analysis
changing toList to collect(Collectors.toList()) to support Java 11 as…
2 parents 7e06a77 + e5f5fa5 commit 4fe3f39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/ibm/northstar/CodeAnalyzer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.nio.file.Paths;
3737
import java.util.List;
3838
import java.util.Map;
39+
import java.util.stream.Collectors;
3940

4041
/**
4142
* The type Code analyzer.
@@ -129,8 +130,10 @@ private static void analyze() throws IOException, ClassHierarchyException, CallG
129130
analysisLevel = 1;
130131
}
131132

133+
// Previous code was pointing to toList, which has been introduced in Java 16
134+
// symbolTable = SymbolTable.extract(Paths.get(input), targetFiles.stream().map(Paths::get).toList()).getLeft();
132135
// extract symbol table for the specified files
133-
symbolTable = SymbolTable.extract(Paths.get(input), targetFiles.stream().map(Paths::get).toList()).getLeft();
136+
symbolTable = SymbolTable.extract(Paths.get(input), targetFiles.stream().map(Paths::get).collect(Collectors.toList())).getLeft();
134137

135138
// if analysis file exists, update it with new symbol table information for the specified fiels
136139
if (analysisFileExists) {

0 commit comments

Comments
 (0)