public <T> T[] toArray(T objects[]) {
// ak: the original imp is plain garbage. Who came up with this?
// NSArray array = arrayByAddingObjectsFromArray(new
NSArray(objects));
// return (T[]) array.objects();
if(objects.length < _objects.length) {
objects = (T[])
java
.lang.reflect.Array.newInstance(objects.getClass().getComponentType(),
_objects.length);
}
for (int i = 0; i < _objects.length; i++) {
objects[i] = (T) _objects[i];
}
return objects;
}
The _objects is null for an EmptyArray.
Pierre
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 22, 2008, at 14:23, Mike Schrag wrote:
Could you try without Wonder please. Wonder has its own implementation of NSArray and I am not sure what is going on.In the 5.4 build, it should not. I'm pretty sure our impls get dropped in that build ... Not to say there isn't something else interfering here, though.ms _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/pierre%40apple.com This email sent to [EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
