Re: _EOCheapCopyMutableArray bug!
Re: _EOCheapCopyMutableArray bug!
- Subject: Re: _EOCheapCopyMutableArray bug!
- From: Ian Joyner <email@hidden>
- Date: Fri, 8 Dec 2006 12:02:58 +1100
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:
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:
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:
This email sent to email@hidden