Skip to content

Commit fb92231

Browse files
committed
updating jar w/ flatiron32's enhancement, fixing warnings
1 parent 93a49ab commit fb92231

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎koans/app/lib/koans.jar‎

1.5 KB
Binary file not shown.

‎lib/file-monitor/src/com/sandwich/util/io/DataFileHelper.java‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.File;
44
import java.io.FileInputStream;
55
import java.io.FileOutputStream;
6+
import java.io.IOException;
67
import java.io.ObjectInputStream;
78
import java.io.ObjectOutputStream;
89

@@ -48,6 +49,14 @@ public T read(){
4849
throw new RuntimeException(e2);
4950
}
5051
throw new RuntimeException(e);
52+
} finally {
53+
if(objectInputStream != null){
54+
try {
55+
objectInputStream.close();
56+
} catch (IOException e) {
57+
throw new RuntimeException(e);
58+
}
59+
}
5160
}
5261
}
5362

@@ -65,6 +74,14 @@ public void write(T state){
6574
throw new RuntimeException(e2);
6675
}
6776
throw new RuntimeException(e);
77+
} finally {
78+
if(objectOutputStream != null){
79+
try {
80+
objectOutputStream.close();
81+
} catch (IOException e) {
82+
throw new RuntimeException(e);
83+
}
84+
}
6885
}
6986
}
7087

‎lib/koans-tests/test/com/sandwich/koan/AnonymousInnerClassTest.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ public class AnonymousInnerClassTest extends CommandLineTestCase{
1313
public void testAnonymousInnerClassIsCoolToUseAsKoan() throws Exception {
1414
final String definitelyAUniqueString = "meh1294120240912049";
1515
stubAllKoans(Arrays.asList(new Object(){
16-
@SuppressWarnings("unused")
1716
@Koan public void printMsg(){
1817
System.out.println(definitelyAUniqueString);
1918
}

‎lib/koans-tests/test/com/sandwich/util/KoanComparatorTest.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class KoanComparatorTest extends CommandLineTestCase {
1818
@Test
1919
public void testThatKomparatorBombsWhenNotFound() throws Exception {
2020
Method m = new Object(){
21-
@SuppressWarnings("unused") @Koan public void someMethod(){}
21+
@Koan public void someMethod(){}
2222
}.getClass().getDeclaredMethod("someMethod");
2323
KoanComparator comparator = new KoanComparator("meh");
2424
try{
@@ -29,8 +29,8 @@ public void testThatKomparatorBombsWhenNotFound() throws Exception {
2929
@Test
3030
public void testComparatorRanksByOrder() throws Exception {
3131
Class<? extends Object> clazz = new Object(){
32-
@SuppressWarnings("unused") @Koan public void someMethodOne(){}
33-
@SuppressWarnings("unused") @Koan public void someMethodTwo(){}
32+
@Koan public void someMethodOne(){}
33+
@Koan public void someMethodTwo(){}
3434
}.getClass();
3535
KoanMethod m1 = KoanMethod.getInstance("",clazz.getDeclaredMethod("someMethodOne"));
3636
KoanMethod m2 = KoanMethod.getInstance("",clazz.getDeclaredMethod("someMethodTwo"));

0 commit comments

Comments
 (0)