Skip to content
Open
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
9 changes: 8 additions & 1 deletion java/src/main/java/ca/uwaterloo/cs489/exercise2/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private static Path getDirectory() throws IOException {
}

public static void main(String[] args) {
final Logger logger = LogManager.getLogger(MainApp.class.getName());
final java.util.logging.Logger logger = LogManager.getLogger(MainApp.class.getName());

// Open the dir
try {
Expand All @@ -35,7 +35,14 @@ public static void main(String[] args) {
for (Path entry : ds) {
Job job = new Job(entry.toFile());
logger.info(String.format("Job %d yields %d\n", job.getInput(), job.processJob()));


entry.toFile().delete();
logger.info(String.format("Deleted file for Job %d from temporary directory", job.getInput() ));
}

dir.toFile().delete();
logger.info("Deleted the temporary file");
} catch (IOException e) {
e.printStackTrace();
}
Expand Down