Re: Java 1.5 & WO?
Re: Java 1.5 & WO?
- Subject: Re: Java 1.5 & WO?
- From: Christian Pekeler <email@hidden>
- Date: Thu, 26 Jan 2006 18:55:18 -0700
Has anyone tried Java 1.5 and WO?
I've run into an issue with the new for() syntax.
@Test public void arrayIteratorProblem() {
int count = 0;
NSArray array = new NSMutableArray(30);
for (Object object: array)
count++;
assertEquals(0, count);
The test fails with count == 30. I believe the underlying problem is
a bug in NSArray.iterator() which returns an Iterator setup for the
array's capacity instead of the array's size.
Workaround:
for (Object object: array.objects())
It might help if more people file bug reports about the
NSArray.iterator() issue.
Christian
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden