Merge pull request #15 from ThomasRubini/arch_null

This commit is contained in:
Thomas Rubini 2022-12-13 09:10:58 +01:00 committed by GitHub
commit c3e55395aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,11 +132,15 @@ public class ArchDistribution implements Distribution {
futureDeps.add(getPackageTree(depPackageName, depth - 1)); futureDeps.add(getPackageTree(depPackageName, depth - 1));
} }
for(CompletableFuture<Package> future : futureDeps){ for(CompletableFuture<Package> future : futureDeps){
Package dep;
try { try {
deps.add(future.get()); dep = future.get();
} catch (InterruptedException | ExecutionException e) { } catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
if(dep!=null){
deps.add(dep);
}
} }
// TODO this doesn't seem clean // TODO this doesn't seem clean