• 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: Does WebObjects use Java 1.5?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Does WebObjects use Java 1.5?
      • From: David Avendasora <email@hidden>
    • Re: Does WebObjects use Java 1.5?
      • From: Thomas <email@hidden>
References: 
 >Does WebObjects use Java 1.5? (From: Christian Telepski <email@hidden>)
 >Re: Does WebObjects use Java 1.5? (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: Strange UTF-8 problems with DirectAction
  • Next by Date: Re: Does WebObjects use Java 1.5?
  • Previous by thread: Re: Does WebObjects use Java 1.5?
  • Next by thread: Re: Does WebObjects use Java 1.5?
  • Index(es):
    • Date
    • Thread