In my opinion, it is just RI' s implementation and it is up to you as a
developer to make the choice.:)
On 8/21/06, Spark Shen <[EMAIL PROTECTED]> wrote:
Leo Li 写道:
> If so, we cannot regard it as RI's bug. And I believe the size of 64
> and the
> existence of the deleted element depends on RI'
Leo Li 写道:
> If so, we cannot regard it as RI's bug. And I believe the size of 64
> and the
> existence of the deleted element depends on RI's algorithm especially it
> does not provide concurrent assurance. Maybe it is due to performance
> concerns, I am not sure.
> The curious thing is whether we
Spark Shen wrote:
But, do you agree to following RI on this strange behavior?
Personally, I think throw an IllegalStateException here is more
appropriate.
The spec for Iterator.remove() says:
"Throws ||IllegalStateException - if the next method has not yet been
called, or the remove method
If so, we cannot regard it as RI's bug. And I believe the size of 64 and the
existence of the deleted element depends on RI's algorithm especially it
does not provide concurrent assurance. Maybe it is due to performance
concerns, I am not sure.
The curious thing is whether we should behave as RI s
Leo Li 写道:
Hi, Spark:
Yes, I think it is RI's bug.
But It should throw ConcurrentModificationException as spec says:
1. This exception may be thrown by methods that have detected
concurrent modification of an object when such modification is not
permissible.
2. Note that this exception does not a
Jimmy, Jing Lv 写道:
Spark Shen wrote:
Hi All:
The following behavior of RI java.util.EnumSet seems odd. Do you have
any opinion on whether it is a bug of RI?
import java.util.EnumSet;
import java.util.Iterator;
public class Test {
static enum EnumFoo {
a, b,
}
public static void main(String[]
Spark Shen wrote:
Hi All:
The following behavior of RI java.util.EnumSet seems odd. Do you have
any opinion on whether it is a bug of RI?
import java.util.EnumSet;
import java.util.Iterator;
public class Test {
static enum EnumFoo {
a, b,
}
public static void main(String[] ar
Hi, Spark:
Yes, I think it is RI's bug.
But It should throw ConcurrentModificationException as spec says:
1. This exception may be thrown by methods that have detected
concurrent modification of an object when such modification is not
permissible.
2. Note that this exception does n
Hi All:
The following behavior of RI java.util.EnumSet seems odd. Do you have
any opinion on whether it is a bug of RI?
import java.util.EnumSet;
import java.util.Iterator;
public class Test {
static enum EnumFoo {
a, b,
}
public static void main(String[] args){
EnumSet