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



Relevant Pages

  • Re: Different complining result between SUN JDK 1.4 and IBM JDK 1.3.1
    ... > 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. ... The test method invocation cannot never thrown any exception ...
    (comp.lang.java.developer)
  • Re: Different complining result between SUN JDK 1.4 and IBM JDK 1.3.1
    ... > 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. ... The test method invocation cannot never thrown any exception ...
    (comp.lang.java.programmer)
  • Re: Trace flow of method call
    ... I found IBM JDK has such a feature, named method trace (which I do not see ... in SUN JDK) ... IBM JDK also has a java API to dump a stack trace... ...
    (comp.lang.java)
  • Re: Can Sun JDK 118 run on Windows XP?
    ... The only solution I found is using the IBM JDK 1.1 instead. ... It works on Windows XP and also on Windows 2000 where the ... SUN JDK is making troubles as well on some systems. ... The answer is forty-two, ...
    (comp.lang.java.programmer)