Wilbert Hengst wrote:
> Does anyone, maybe especially the developer that changed
> the Enemeration into Iterator, oppose reverting back to the old code
> using an Enumeration instead of an Iterator?

The main reason for using Iterator is to have a uniform iteration class 
- iterator being preferred mostly because it is avaialable in all 
collections - not just the Vector class.

Sun's comments:

"Iterator takes the place of Enumeration in the Java collections framework"

and

" New implementations should consider using Iterator in preference to 
Enumeration. "

However it also says:
" The behavior of an iterator is unspecified if the underlying 
collection is modified while the iteration is in progress."

which means anything may happen (but most often it throws an exception).
I could find no specs for what Enumeration is supposed to do - I guess 
it doesn't check but I'm unsure if this is defined behavior and whetehr 
that makes it fail proof.

Anyway I think that for now we can change it back (though I am not sure 
what is the exact use of logging all running servlets?).

-- 
Pierre van Rooden
Mediapark, C 107 tel. +31 (0)35 6772815
"So long, and thanks for all the fish"


Reply via email to