patch for wonders NSArray implementation
patch for wonders NSArray implementation
- Subject: patch for wonders NSArray implementation
- From: Oliver Egger <email@hidden>
- Date: Mon, 18 Feb 2013 15:43:24 +0100
Hi all
During upgrading the wonder frameworks to the 6.0 versions we noticed a changed behaviour
in NSArray.
In the NSArray_findObjectInArray function, if identical is set to false, the orginial version does not
return an earlier equal object (as the wonder version does) but the first object matching the same object.
Please consider to include the attached patch, if you need further information do not hesitate to contact
me.
Best regards
Oliver
@@ -510,10 +510,12 @@ public class NSArray<E> implements Cloneable, Serializable, NSCoding, NSKeyValue
if (objects[i] == object) {
return i;
}
- if (!identical && object.equals(objects[i])) {
+ }
+ if(!identical)
+ for (int i = index; i <= maxIndex; i++) {
+ if (object.equals(objects[i])) {
return i;
}
-
}
}
--
--
oliver egger
_______________________________________________
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