• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Java 1.5 & WO?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Java 1.5 & WO?
      • From: Randy Wigginton <email@hidden>
  • Prev by Date: Re: In memoriam David TerĂ¡n
  • Next by Date: Re: Java 1.5 & WO?
  • Previous by thread: Re: XCode corruption ?
  • Next by thread: Re: Java 1.5 & WO?
  • Index(es):
    • Date
    • Thread