I hate when I do things like that. Usually it means its time to stop
drinking, or really start pounding down the beer.

while (it.hasNext()); // this is the same as while(it.hasNext()) {};
{
 // NOT LOOPED because of the previous line's ';' teminates the code block
for the while loop
 do_something();
}


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of marc
fleury
Sent: Wednesday, January 09, 2002 5:56 PM
To: Dave Smith
Cc: [EMAIL PROTECTED]
Subject: RE: [JBoss-dev] Am I a clown?


nope that's not it... 2 hours I stared at it...

come on come on, it is so obvious,

damn semicolons...

marcf

|-----Original Message-----
|From: Dave Smith [mailto:[EMAIL PROTECTED]]
|Sent: Wednesday, January 09, 2002 12:43 PM
|To: marc fleury
|Cc: [EMAIL PROTECTED]
|Subject: Re: [JBoss-dev] Am I a clown?
|
|
|Putting on his big shoes ...
|
|HashMap is not syncnronized, possible another thread is modifing the
|HashMap?
|or
|You are modifing the set inside the loop?
|
|marc fleury wrote:
|
|> So I just spent 2 hours spotting the following interesting bug
|>
|> HashMap deployments ...
|>
|> Iterator it = deployments.keySet().iterator();
|>
|> while (it.hasNext());
|> {
|>  do something();
|> }
|>
|> which would peg my CPU at 100% and never reach do something ...
|>
|> man I am a clown... can you see it? 2 hours!
|>
|> marcf
|> ______________________________________________________________________
|> View this jboss-dev thread in the online forums:
|> http://jboss.org/forums/thread.jsp?forum=66&thread=6868
|>
|> _______________________________________________
|> Jboss-development mailing list
|> [EMAIL PROTECTED]
|> https://lists.sourceforge.net/lists/listinfo/jboss-development
|>
|>
|
|

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to