Re: WebObjects 5.4 is out.
Re: WebObjects 5.4 is out.
- Subject: Re: WebObjects 5.4 is out.
- From: Art Isbell <email@hidden>
- Date: Fri, 26 Oct 2007 16:38:12 -1000
On Oct 26, 2007, at 4:18 PM, Art Isbell wrote:
Also, the use of Java generics in the API declarations in the WO
5.4 frameworks may generate lots of warnings in your custom WO 5.3
code.
Actually, the following statement refused to compile under WO 5.4
(error, not warning). This uses pure WO framework API, none of my
custom API:
entity
.setClassProperties
(entity
.classProperties
().arrayByAddingObjectsFromArray(entity.primaryKeyAttributes()));
The error: "The method
arrayByAddingObjectsFromArray(NSArray<EOProperty>) in the type
NSArray<EOProperty> is not applicable for the arguments
(NSArray<EOAttribute>)". Say what?! An EOAttribute is an EOProperty!
My workaround:
NSMutableArray<EOProperty> classProperties =
entity.classProperties().mutableClone();
classProperties.addObjectsFromArray(entityL.primaryKeyAttributes());
entity.setClassProperties(classPropertiesL);
The cause of this compiler error has been confirmed to be a WO 5.4
bug related to an improper declaration involving Java generics.
Genericizing one's code correctly can be tricky stuff, but I think
that most of such bugs can be worked around until they're fixed.
Aloha,
Art
_______________________________________________
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