[kaffe] Hashtable.get() bug
Dalibor Topic
robilad at yahoo.com
Fri Jun 7 03:26:29 PDT 2002
Hi alexander,
--- Alexander Popov <s_popov at prosyst.bg> wrote:
> Opppsss, sorry...
>
> I was pretty busy - I guess I should have had my
> time on the example
> code - sorry.
> I still pretend that the bug is there though. I'll
> write a good example.
>
> ...just to illustrate the problem, see this ( it's
> where it crushes our
> service framework ) :
>
> <cut>
>
> /**
> * Reads the current storage size.
> */
> private void init() throws IOException {
> System.out.println("--404: FileSystemImpl - init
> 1");
> System.out.println("--404: FileSystemImpl - SIZE :
> " + SIZE);
>
> // 404 - Kaffe workarround
>
> System.out.println("--404: FileSystemImpl -
> props : " + ( props ==
> null ) );
>
> System.out.println("--404: FileSystemImpl - +1 "
> );
>
> byte[] bytes = (byte[]) props.get(SIZE);
>
> System.out.println("--404: FileSystemImpl - init
> 2");
>
> if(bytes != null) currentlyUsedStorage =
> toLong(bytes);
>
> // currentlyUsedStorage = 729200;
>
> // 404 ^
>
> System.out.println("--404: FileSystemImpl - init
> 3");
> }
>
> <cut>
>
> props is Xproperties which extends Properties...
Well, a small self contained example that triggers the
bug would be much more helpful, really. For example,
you are not using props in a thread safe way, so
another thread could set it to null after you have
assured yourself that it is not null, but before you
get to call props.get().
regards,
dalibor topic
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
More information about the kaffe
mailing list