Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _EOCheapCopyMutableArray bug!



Just hit this problem myself, since I was changing Enumeration to the more elegant Iterator and wanted to use generics (which should avoid runtime type checking, but I'm not sure if it can since you can't put a matching generic type on the NSArray and for backward compatibility, Java does not enforce compile time checking).

One workaround is to retain the enumerator line to fire the fault:

	Enumeration e = a.objectEnumerator ()

However, I can add a generic spec to enumerations:

	Enumeration <Thing> e = a.objectEnumerator ()

which at least gets rid of the arcane type cast (type casting is evil!).

but I still don't like the verbosity of the Enumeration names (objectEnumerator vs iterator, hasMoreElements vs hasNext, nextElement vs next withLongMultipartedNames made even more difficult to read with no white space), and obviously the Java people realised a verbiage cleanup was in order.

So, I'd like them to get Iterator working right (since it now seems to be preferred as opposed to Enumeration) and have submitted a bug report, even if it is a duplicate.

Ian

On 05/05/2006, at 10:25 PM, Mike Schrag wrote:

I logged this bug a while back and it was marked as a Duplicate, so they appear to know ... Avoid iterator like the plague.

On May 5, 2006, at 2:49 AM, Pierre Bernard wrote:

Hi!

it appears that the iterator() method on _EOCheapCopyMutableArray does not trip faults. One thus may end up with an empty iterator.

Pierre.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 40mdimension.com


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ian.joyner% 40sportstec.com


This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.