er 09, 2003 4:44 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Bug catching contest...
- Original Message -
From: "Dick Zetterberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 10:07 AM
Subject: Re: [OS-webwork] Bug catching cont
2003 7:30 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Bug catching contest...
>
> >
> > Actually this code wouldn't fix anything. The difference is that this
> code
> > is visibly not synchronized, while the previous code was unvisibly not
> >
Right, but there's no need for an external lib, when you can just do:
Collections.synchronizedMap(new HashMap())
Jason
-Original Message-
From: Dick Zetterberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 7:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Bug cat
>
> Actually this code wouldn't fix anything. The difference is that this code
> is visibly not synchronized, while the previous code was unvisibly not
> synchronized.
>
> The point is that to make it working, both get and put must be in the same
> synchronized block. Otherwise you may just leave
- Original Message -
From: "Dick Zetterberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 10:07 AM
Subject: Re: [OS-webwork] Bug catching contest...
>
> Can't you just fix this by using a ConcurrentHashMap or a
ssion is
not null and the Ognl.parseExpression does not return null.
Cheers,
Dick Zetterberg
[EMAIL PROTECTED]
- Original Message -
From: "Patrick Lightbody" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 09, 2003 7:10 AM
Subject: RE: [OS-we
phony-webwork
Subject: [OS-webwork] Bug catching contest...
This code won't work as you would expect. It's that kind of bug you
wouldn't
expect, but also that kind that should be taught on every programming
course
(rare).
For those who are impatient and don't want to find out wh
This code won't work as you would expect. It's that kind of bug you wouldn't
expect, but also that kind that should be taught on every programming course
(rare).
For those who are impatient and don't want to find out why it won't work I
suggest googling for "double checked locking" or DCL. Due to