Re: Different complining result between SUN JDK 1.4 and IBM JDK 1.3.1

From: Dario (dario_at_despammed.com)
Date: 03/16/04


Date: Tue, 16 Mar 2004 15:06:18 +0100


>> What happend? Who is right?
>
> They both are right.
>
> I think if you take out the finally part, then Sun JDK 1.4.2 compiler
> will has the same error message as IBM JDK 1.3.1
>
> Sun just gives you the warning first, IBM gives you the error first.

No.
As I already pointed out in the previous post,
the program is perfectly legal.
There is no error at all.

The test method invocation cannot never thrown any exception
because in the finally section there is only:
   return new Object();
that never throw any exception.

Please re-read carefully the Java Language specification.

- Dario