Re: Does WebObjects use Java 1.5?
Re: Does WebObjects use Java 1.5?
- Subject: Re: Does WebObjects use Java 1.5?
- From: Francis Labrie <email@hidden>
- Date: Thu, 22 Mar 2007 12:34:10 -0400
Hi,
Ian Joyner wrote:
There is one issue I have found – Iterator does not cause faults to
be loaded. Thus if you use:
Iterator <EOGenericRecord> t = an_array.iterator ()
you will get nothing, whereas the Enumeration form works fine:
Enumeration <EOGenericRecord> e = an_array.objectEnumerator ()
So don't update your enumerations to the new (cleaner and less
verbose) iterator until this problem is fixed. At least the generic
form works with Enumeration so those horrible type casts disappear.
It seems faults are fired on toArray(), objects() and mutableClone()
NSArray interface calls. So preliminary tests seems to allow Java 5
enhanced for loop usage like this:
for(Object object : object.toManyRelationship().toArray()) {
...
}
Unfortunately, WebObjects classes dont use generics, so you still
have to type cast objects. :-(
Can someone confirms that using Java 5 enhanced loop in that way is
safe?
--
Francis Labrie
Saint-Bruno-de-Montarville, Québec, Canada
_______________________________________________
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