I did test on Jbuilder7.0 JDK1.4.
CASE 1:
public void aMethod()
{
try
{
m1();
}
catch (MyException e)
{
m1();
}
finally
{
throw new RuntimeException(); //case (1)
//m2(); //case (2)
}
}
CASE 2:
public void aMethod()
{
try
{
m1();
}
catch (MyException e)
{
m1();
}
finally
{
//throw new RuntimeException(); //case (1)
m2(); //case (2)
}
}
Both case 1 and case 2 got the message:
"test.java": Error #: 360 : unreported exception: hellojava.MyException; must be caught or declared to be thrown at line 55, column 13