Re: NSDictionary.isEmpty
Re: NSDictionary.isEmpty
- Subject: Re: NSDictionary.isEmpty
- From: Mike Schrag <email@hidden>
- Date: Thu, 16 Sep 2010 13:14:00 -0400
The fix is to change NSDictionary.java's isEmpty() method to be: public boolean isEmpty() { return count() <= 0; }
For the record, size() should be changed as well! And perhaps others, but I don't have unit tests for NSDictionary so I'm not changing anything! ;-)
yeah, the current impl is a violation of the contract of NSDictionary, which says you should only have to override count, objectForKey, keysNoCopy, and objectsNoCopy (removeAllObjects, removeObjectForKey, setObjectForKey) in a subclass. i'll commit this fix. crap .. now i have to decide which branch i'm going to make my trunk.
ms |
_______________________________________________
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