Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add null check in diffCordinates function #172

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,15 @@ List<String> diffCoordinates(String baseCommit, String newCommit) {
// If tck was changed we should retest everything, just to be safe.
return getMatchingCoordinates("");
}

// First get all available coordinates, then filter them by if their corresponding metadata / tests directories
// contain changed files.
return getMatchingCoordinates("").stream().filter(c -> {
Path metadataDir = getMetadataDir(c);
if (changed.get("metadata").stream().anyMatch(f -> f.startsWith(metadataDir))) {
if (changed.get("metadata") != null && changed.get("metadata").stream().anyMatch(f -> f.startsWith(metadataDir))) {
return true;
}
Path testDir = getTestDir(c);
if (changed.get("test").stream().anyMatch(f -> f.startsWith(testDir))) {
if (changed.get("test") != null && changed.get("test").stream().anyMatch(f -> f.startsWith(testDir))) {
return true;
}
return false;
Expand Down