fixed some errors found by inspection

This commit is contained in:
Alec Grieser 2017-12-04 10:16:57 -08:00
parent 9d5aa5fc96
commit 8971f35a73
2 changed files with 2 additions and 5 deletions

View File

@ -138,11 +138,8 @@ public class TestResult {
outputBuilder.append('}');
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new FileWriter(file));
try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
writer.write(outputBuilder.toString());
writer.close();
} catch (IOException e) {
System.out.println("Could not write results to file " + file);
throw new RuntimeException("Could not save results: " + e.getMessage(), e);

View File

@ -90,7 +90,7 @@ public class TesterArgs {
if (i + 1 < args.length) {
subspace = new Subspace(Tuple.from(args[++i]));
} else {
System.out.println("No subspace specified for argument " + args + "\n");
System.out.println("No subspace specified for argument " + arg + "\n");
printUsage();
throw new IllegalArgumentException("Not subspace specified for argument " + arg);
}