X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=kona%2Fz-testing%2Fsrc%2Ftest%2Fjava%2Fsemantics%2Fbehavior_of_finally_when_exception_in_catch.java;fp=kona%2Fz-testing%2Fsrc%2Ftest%2Fjava%2Fsemantics%2Fbehavior_of_finally_when_exception_in_catch.java;h=0000000000000000000000000000000000000000;hb=42bf14e9cfbee5ee218bb6a775e3d7b90e9e491c;hp=cbccf0a7fe16baad9856f03472cf0e2533b843d1;hpb=5ecfd83bfba80a156a76866185ccef54a9e03315;p=feisty_meow.git diff --git a/kona/z-testing/src/test/java/semantics/behavior_of_finally_when_exception_in_catch.java b/kona/z-testing/src/test/java/semantics/behavior_of_finally_when_exception_in_catch.java deleted file mode 100644 index cbccf0a7..00000000 --- a/kona/z-testing/src/test/java/semantics/behavior_of_finally_when_exception_in_catch.java +++ /dev/null @@ -1,54 +0,0 @@ -package test.java.semantics; - -import java.io.FileNotFoundException; - -//import java.util.List; - -class finally_behavior_test -{ - int calibrador = 17; - - public finally_behavior_test() - { - } - - public int funkyTown() throws FileNotFoundException - { - if (calibrador < 3) { - // we should never get here. it should always raise an exception. - System.out.println("where did you put it?"); - } else { - throw new FileNotFoundException("is it larger than a breadbox?"); - } - return 25; - } - - public void runTest() throws Throwable - { - try { - int zooty = funkyTown(); - System.out.println("zooty is " + zooty + " but how did we get here???"); - } catch (Throwable cause) { - System.out.println("caught exception, now will rethrow."); - throw cause; - } finally { - System.out.println("still got to finally, our assumptions are safe."); - } - } - - public static void main(String s[]) throws Exception - { - // we are asserting that the finally clause of an exception handler will still - // fire when an exception is raised in the catch clause. otherwise, all our - // assumptions about being able to use finally properly are thrown out the window. - finally_behavior_test tony = new finally_behavior_test(); - try { - tony.runTest(); - } catch (Throwable cause) { - //yawn. - } - System.out.println("Hey, did the finally clause say it ran above?"); - System.out.println("If so, great. If not, we've got problems."); - } - -}