Weird entry in the exception table for monitorenter/monitorexit

I've created a simple test class with one method:

publicclass TestClass{

int a = 0;

publicvoid test(){

synchronized(TestClass.class){

a = 1;

}

}

}

After opening the generated class file with Eclipse I got the next

result (I've removed the parts that are irrelevant)

public void test();

0 ldc <Class TestClass> [1]

2 dup

3 astore_1

4 monitorenter

5 aload_0 [this]

6 iconst_1

7 putfield TestClass.a : int [12]

10 aload_1

11 monitorexit

12 goto 18

15 aload_1

16 monitorexit

17 athrow

18 return

Exception Table:

[pc: 5, pc: 12] -> 15 when : any

[pc: 15, pc: 17] -> 15 when : any

I do understand that after the monitor is entered it is very important that it leaves it again with the instruction monitorexit. In normal case where no exceptions occur it will call monitorexit at the address 11. But if an exception occurs it has to make sure monitorexit is called and therefore the exception table defines in the first entry that on any exception the VM jumps to address 15. Until here everything is understandable, but what is the second entry in the exception table telling me? if an exception occurs betweern 15 and 17 then jump to 15 ... doesn't this cause an endless loop?

[1718 byte] By [DikkeDouwea] at [2007-11-27 10:56:04]
# 1

The second entry in the exception table is probably a "finally" block, and not a catch block.

omcgoverna at 2007-7-29 12:00:46 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

The first is also a finally block since it sais "when : any" ... so no theirs no Exception connected with it and therefor it must be a final block.

DikkeDouwea at 2007-7-29 12:00:46 > top of Java-index,Java HotSpot Virtual Machine,Specifications...