@@ -0,0 +1,1212 @@
+package com.yuzhouwan.hacker.effective;%0A%0Aimport org.junit.Test;%0A%0Aimport static junit.framework.TestCase.assertEquals;%0A%0A/**%0A * Copyright @ 2017 yuzhouwan%0A * All right reserved.%0A * Function%EF%BC%9AFinally Test%0A *%0A * @author Benedict Jin%0A * @since 2017/4/18%0A */%0Apublic class FinallyTest %7B%0A%0A    @Test%0A    public void testReturnInside() throws Exception %7B%0A        Exception catchE = null;%0A        try %7B%0A            someExceptionWrong();%0A        %7D catch (Exception e) %7B%0A            catchE = e;%0A        %7D%0A        assertEquals(true, catchE == null);%0A%0A        try %7B%0A            someExceptionRight();%0A        %7D catch (Exception e) %7B%0A            catchE = e;%0A        %7D%0A        assertEquals(%22java.lang.RuntimeException: Some Problem.%22, catchE.getMessage());%0A    %7D%0A%0A    private void someExceptionWrong() %7B%0A        try %7B%0A            throw new RuntimeException(%22Some Problem.%22);%0A        %7D catch (Exception e) %7B%0A            throw new RuntimeException(e);%0A        %7D finally %7B%0A            return;%0A        %7D%0A    %7D%0A%0A    private void someExceptionRight() %7B%0A        try %7B%0A            throw new RuntimeException(%22Some Problem.%22);%0A        %7D catch (Exception e) %7B%0A            throw new RuntimeException(e);%0A        %7D finally %7B%0A        %7D%0A    %7D%0A%7D%0A

Test for `return` inside `finally` problem