package ca.ubc.ece.salt.sdjsb.batch;

import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;

/**
 * TaskRunner wrapper for GitProjectAnalysis. Initially GitProjectAnalysis would
 * implement Callable itself, but because of the use of a latch, a new class was
 * created.
 */
public class GitProjectAnalysisTask implements Callable<Void> {
	private GitProjectAnalysis gitProjectAnalysis;
	private CountDownLatch latch;

	public GitProjectAnalysisTask(GitProjectAnalysis gitProjectAnalysis, CountDownLatch latch) {
		this.gitProjectAnalysis = gitProjectAnalysis;
		this.latch = latch;
	}

	@Override
	public Void call() throws Exception {
		gitProjectAnalysis.analyze();
		latch.countDown();

		return null;
	}

}

@@ -658,16 +658,25 @@
 ption %7B%0A
+%09%09try %7B%0A%09
 %09%09gitPro
@@ -699,16 +699,149 @@
 lyze();%0A
+%09%09%7D catch (Exception e) %7B%0A%09%09%09System.err.println(%22%5BERR%5D Exception on GitProjectAnalysisTask%22);%0A%09%09%09e.printStackTrace();%0A%09%09%7D finally %7B%0A%09
 %09%09latch.
@@ -852,16 +852,20 @@
 tDown();
+%0A%09%09%7D
 %0A%0A%09%09retu

Fix bug where latch was not being decremented on GitProjectAnalysisTask