You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cm...@yahoo.com on 2000/12/02 00:10:16 UTC

JDK bug or am I crazy ?

Hi,

I spent many hours trying to fix a bug in tomcat3.3. I'm now down to
DependManager, and I really have no idea what's happening.

There is a method:

boolean shouldReload() {}

All return statements are:
"return expired;", where expired is an object property ( no local
variables - the class doesn't extend and it's not extended ).

I do a println(expired) just before every "return expired;" and it prints
"false".

I do a println(expired) after the method returns - it's still "false".

The only problem is that the returned value is "true" - even if the
function returns a value that is false before and after the return
statement. ( the variable is final, and there is only one place that
sets it true, and that point is never reached ).

This doesn't happen if I use IBM JDK1.3 - only with Blackdown 1.2.2 ( FCS,
BETA ).

VERY, VERY SCARRY !!! 


Costin


Re: JDK bug or am I crazy ?

Posted by cm...@yahoo.com.
> > This doesn't happen if I use IBM JDK1.3 - only with Blackdown 1.2.2 (
FCS,
> > BETA ).
> > 
> > VERY, VERY SCARRY !!!
> 
> Does disabling the JIT help any? ( -Djava.compiler= )

Doesn't help - I tried that.

Anyway - now we have a workaround, but we do print a warning when this
happens ( I still have to make sure the warning is displayed only once ).

Costin


Re: JDK bug or am I crazy ?

Posted by Louis Tribble <lo...@metamata.com>.
cmanolache@yahoo.com wrote:
> 
> Hi,
> 
> I spent many hours trying to fix a bug in tomcat3.3. I'm now down to
> DependManager, and I really have no idea what's happening.
> 
> There is a method:
> 
> boolean shouldReload() {}
> 
> All return statements are:
> "return expired;", where expired is an object property ( no local
> variables - the class doesn't extend and it's not extended ).
> 
> I do a println(expired) just before every "return expired;" and it prints
> "false".
> 
> I do a println(expired) after the method returns - it's still "false".
> 
> The only problem is that the returned value is "true" - even if the
> function returns a value that is false before and after the return
> statement. ( the variable is final, and there is only one place that
> sets it true, and that point is never reached ).
> 
> This doesn't happen if I use IBM JDK1.3 - only with Blackdown 1.2.2 ( FCS,
> BETA ).
> 
> VERY, VERY SCARRY !!!

Does disabling the JIT help any? ( -Djava.compiler= )

Louis
-- 

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Louis Tribble                                         louis@metamata.com
Metamata, Inc.                                   http://www.metamata.com
Tools for serious Java developers.                       +1 510 796 0915
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

Re: JDK bug or am I crazy ?

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
cmanolache@yahoo.com <cm...@yahoo.com> wrote:
> 
> This doesn't happen if I use IBM JDK1.3 - only with Blackdown 1.2.2 ( FCS,
> BETA ).

Sure sounds like a JDK bug... Did you try using Sun's JDK for Linux?

    Pier

-- 
Pier P. Fumagalli  Apache Software Foundation  <ma...@betaversion.org>
----------------------------------------------------------------------------
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur,
adipisci velit...                             (Cicero: "De Finibus" 1.10.32)