2003-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / corlib / System.Collections / ChangeLog
1 2003-12-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
2
3         * Queue.cs: patch from Carlos Barcenilla.
4         public class Queue
5                 - method: ICollection.Clone()
6                 - Optimized. Removed unneeded instructions.
7                 - method: public static Queue Synchronized (Queue queue)
8                 - ArgumentNullException.ParamName must be "queue", not null.
9                 - method: public virtual void TrimToSize()
10                 - Must increment modCount.
11
12         private class SyncQueue
13                 - method: public override object Clone ()
14                 - Must return a synchronized (SyncStack) instance.
15                 - method: public override void TrimToSize ()
16                 - Not implemented.
17
18 2003-11-13  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
19
20         * IEnumerator.cs: Added missing attribute
21
22 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
23
24         * CaseInsensitiveComparer.cs: Add missing method.
25
26 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
27
28         * Stack.cs: Applied patch from Carlos A. Barcenilla to fix minor
29         bugs (#50755).
30
31 2003-11-03  Lluis Sanchez Gual <lluis@ximian.com>
32
33         * SortedList.cs: Added [Serializable] to Slot class. This fixes bug #50484.
34
35 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
36
37         * System.Collections/Hashtable.cs: patch from Carlos A.
38         Barcenilla (barce@frlp.utn.edu.ar) that includes some fixes for
39         Hashtable + NUnit2 tests.
40
41 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
42
43         * Queue.cs: nullify the array in Clear.
44
45 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
46
47         * Hashtable.cs: Remove empty static constructor since it prevents this
48         class from being beforefieldinit.
49
50 2003-08-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
51
52         * CaseInsensitiveHashCodeProvider.cs: small speed improvement.
53
54 2003-08-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
55
56         * Stack.cs: patch by JoergR@voelcker.com (Joerg Rosenkranz) that fixes
57         bug #47789.
58
59 2003-08-20  Duncan Mak  <duncan@ximian.com>
60
61         * Hashtable.cs (PutImpl): Fix my previous checkin, see details
62         posted on bug #47692.
63
64         I really hope I don't mess up this time, because, if I do again,
65         it will be really embarrassing.
66
67 2003-08-17  Duncan Mak  <duncan@ximian.com>
68
69         * Hashtable.cs (PutImpl): Patch from Luca Barbieri <lb@lb.ods.org>.
70         Currently Hashtable.PutImpl has an incorrect test which causes the
71         key chain search to terminate as soon as a free slot is found,
72         causing key duplication.
73
74         This fixes bug #47692.
75
76 2003-08-11  Duncan Mak  <duncan@ximian.com>
77
78         * DictionaryBase.cs: Applied patch from Carlos Barcenilla
79         (barce@frlp.utn.edu.ar).
80         
81         (Idictionary.Add): Added OnValidate, and undo the transaction if
82         OnInsertCompleteFails.
83
84         (Indexer set): MS Implementation does not call OnInsert and undoes
85         if OnSetComplete throws an exception
86         (Indexer get): return value is obtained after calling OnGet.
87
88         (IDictionary.Remove): Call to OnValidate added. If key does not
89         exists calls OnValidate, OnRemove and OnRemoveComplete.
90
91         (protected IDictionary Dictionary get): Should return itself, not
92         the inner hashtable.
93
94         This fixes bug #47460.
95
96 2003-08-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
97
98         * CollectionBase.cs: applied patch from Carlos Barcenilla
99         (barce@frlp.utn.edu.ar).
100
101 2003-08-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
102
103         * ArrayList.cs: added / so that gvim syntax highlight doesn't go crazy.
104         * CollectionBase.cs: fixed several bugs reported by Carlos Barcenilla
105         (barce@frlp.utn.edu.ar). Most of the patch is also his.
106
107 2003-07-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
108
109         * ArrayList.cs: fixed EnsureCapacity when m_Data.Length is 0.
110
111 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
112
113         * ArrayList.cs: Deployed ArrayList from Tum;  Fixed iterator to
114         allow nulls, and inline a few calls to make profiling more useful.
115
116 2003-07-24  Miguel de Icaza  <miguel@ximian.com>
117
118         * ArrayList.cs: Removed MonoTODO.
119
120 2003-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
121
122         * Hashtable.cs: made SynchedHashtable serializable. Fixes bug #45918.
123         Thanks to JoergR@voelcker.com (Joerg Rosenkranz).
124
125 2003-06-27  Duncan Mak  <duncan@ximian.com>
126
127         * Hashtable.cs: Patch from PAF@design.ru, GetEnumerator should be
128         returning DictionaryEntrys, instead of just the Key of the table.
129
130 2003-06-26  Lluis Sanchez Gual  <lluis@ximian.com>
131
132         * Hashtable.cs: Fixed bug when serializing and deserializing
133           a hashtable from which one element has been deleted. The Object instance
134           used as a removed marker is not detected as a such, since the
135           serializer creates a different instace.
136
137 2003-06-13  Herve Poussineau  <hpoussineau@fr.st>
138
139         * SortedList.cs: Can enumerate on DictionaryEntries, not only on
140         keys on values. Enumerate by default on DictionaryEntries.
141
142 2003-06-12  Duncan Mak  <duncan@ximian.com>
143
144         * Hashtable.cs (constructor):
145         if loadFactor equals Single.NaN, then throw an
146         ArgumentOutOfRangeException.
147
148         if we set capacity to be too big (ie. capacity / loadFactor is
149         greater than Int32.MaxValue), then we throw an ArgumentException.
150
151 2003-06-11  Duncan Mak  <duncan@ximian.com>
152
153         * SortedList.cs: Oi! What a mess.
154
155         If the list was constructed using the null-param constructor, and
156         it tries to set it to a size lower than the default, let it do so.
157
158         If the list was constructed with a specific size, and it tries to
159         set it to a size lower than the specified size, set it to the
160         default size.
161
162         (IndexOfValue): Clean up the code somewhat, make it allow for
163         values to be null.
164
165 2003-06-08  Ben Maurer <bmaurer@users.sourceforge.net>
166         * ArrayList.cs, Hashtable.cs, SortedList.cs: Enumerator fixes, error
167         checking
168
169 2003-06-07  Ben Maurer <bmaurer@users.sourceforge.net>
170         * Stack.cs: Contains (null) works correctly. We never have the
171         array sized less than 16, so that the doubling logic works no
172         matter what. The enumerator is IClonable, like in ms. The
173         Enumerator correctly throws an exception if Current is called
174         before the enumerator is started. We now pass all the Rotor tests
175         for this file!
176
177 2003-06-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
178
179         * Stack.cs: fixed Clone ().
180
181 2003-06-04  Ben Maurer <bmaurer@users.sourceforge.net>
182         * DictionaryEntry.cs: Throw exception if key == null. Fixes Rotor
183         failures
184
185 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
186
187         * ArrayList.cs: nullify the array in Clear ().
188         * Queue.cs: nullify the array in Dequeue ().
189         * Stack.cs: nullify the array in Pop ().
190
191 2003-06-02  Ben Maurer <bmaurer@users.sourceforge.net>
192         * Queue.cs: Added argument checking in constructors according to
193         specs. Also changed default size to 32 as required by the specs.
194
195 2003-05-31  Ben Maurer <bmaurer@users.sourceforge.net>
196         * BitArray.cs: Rewrote, as it was failing most of the Rotor
197         tests. It now passes them 100%. Also fixes bug #43667.
198
199 2003-05-03 Ben Maurer <bmaurer@users.sourceforge.net>
200 * ArrayList.cs
201         Made ArrayList.GetRange () make a wrapper around the array list, like Microsoft does. Fixes bug #39724.
202
203 2003-05-03 Ben Maurer <bmaurer@users.sourceforge.net>
204 * ArrayList.cs
205         Added methods to support IList wrappers
206
207 2003-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
208
209         * ArrayList.cs: patch from bernard@ugsolutions.com (Bernie Solomon)
210         that fixes bug #41684.
211
212 2003-04-15 Eduardo Garcia Cebollero <kiwnix@yahoo.es>
213
214         * CaseInsensitiveComparerTest.cs: Fixed Compare Method (now works
215         like MS.NET) and implemented the
216         CaseInsensitiveComparerTest(culture) constructor.
217
218 2003-03-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
219
220         * Queue.cs: fixed bug #39046.
221
222 2003-02-15  Pedro Martínez Juliá  <yoros@wanadoo.es>
223
224         * Hashtable.cs: Make hashtable serializable (at least with binary
225         formatter). This process was started by the Hashtable maintainer.
226
227 2003-02-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
228
229         * ArrayList.cs: fixed setSize (!).
230
231 2003-01-31  Zoltan Varga  <vargaz@freemail.hu>
232
233         * ArrayList.cs (RemoveAt): duplicated the the code from RemoveRange
234         here, since RemoveAt raises a different exception than RemoveRange
235         when the index is out-of-range. Fixes the ArrayList unit tests.
236
237         * ArrayList.cs (RemoveRange): fixed indentation.
238
239 2003-01-12  Varga Zoltan <vargaz@freemail.hu>
240
241         * ArrayList.cs (RemoveRange): Patch for allowing zero-size
242         removal at the end of a list. It also cleans up the argument
243         checking code so the raised exceptions have the same message as
244         under MS.NET.
245
246 2003-01-10  Duncan Mak  <duncan@ximian.com>
247
248         * ArrayList.cs (Insert): Patch from Zoltan
249         (Zoltan.2.Varga@nokia.com).
250
251 2002-10-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
252
253         * Hashtable.cs: add the key to the error message when
254         'key duplication'.
255
256 2002-10-15  Vladimir Vukicevic  <vladimir@pobox.com>
257
258         * Queue.cs: update new capacity in grow(), preventing queue from
259         constantly looping over old elements in Dequeue(). Also use
260         capacity instead of contents.Length in Enqueue().
261
262 2002-09-24  Nick Drochak  <ndrochak@gol.com>
263
264         * ArrayList.cs: Make enumerator throw exception if the ArrayList is
265         mutated (Insert, Delete, etc.). Also, fix bug in InsertRange() when
266         this was passed as parameter.
267
268 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
269
270         * ArrayList.cs: fixed bug #29658.
271
272 2002-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
273
274         * ArrayList.cs:
275         * BitArray.cs:
276         * CaseInsensitiveComparer.cs:
277         * CaseInsensitiveHashCodeProvider.cs:
278         * IEnumerable.cs:
279         * Queue.cs: misc. fixes based on class status page.
280
281 2002-07-22  Tim Coleman  <tim@timcoleman.com>
282         * CaseInsensitiveHashCodeProvider.cs: Added missing constructor
283                 which was breaking System.Web build on linux
284
285 2002-07-05  Sergey Chaban <serge@wildwestsoftware.com>
286
287         * SortedList.cs: Implemented thread-safe wrapper. Changed some
288         args to camelCase.
289
290 2002-07-02  Nick Drochak  <ndrochak@gol.com>
291
292         * SortedList.cs: Constructors should use the capacity given regardless 
293         how small. After a Clear() the Capacit should be 16. Since a Dictionary
294         might be used in the constructor, make sure we trap exceptions thrown
295         by the Comparer, like in Add().
296
297 2002-06-30  Nick Drochak  <ndrochak@gol.com>
298
299         * SortedList.cs: Many fixed. A lot of checking for null and throwing
300         exceptions.  A few logic bugs fixed as well
301
302 2002-06-25   Nick Drochak  <ndrochak@gol.com>
303
304         * Queue.cs (CopyTo): Fix logic for copying the circular array.
305         (Enqueue): Use actual length of array to determine when to grow
306         (QueueEnumerator) Fixed Current to use array length, not capacity, and
307         fixed off-by-one errror in MoveNext().
308
309 Tue Jun 4 13:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
310
311         * ArrayList.cs: fixed RemoveAt() implementation.
312
313 2002-05-27  Nick Drochak  <ndrochak@gol.com>
314
315         * ArrayList.cs (LastIndexOf): Return -1 if searching for null, also
316         fix check of parameters sent to make sure we don't search beyond the
317         beginning of the list.
318         (ListWrapper): Throw exception if called with null.
319         We now pass all unit tests.
320
321 2002-05-23  Duncan Mak  <duncan@ximian.com>
322
323         * ArrayList.cs (Wrapper): Preliminary implementation of
324         ArrayList.Wrapper (IList).
325
326 2002-05-22  Martin Baulig  <martin@gnome.org>
327
328         * ArrayList.cs: Made count, capacity and dataArray the first three
329         fields in the class.  They're read by the reflection library.
330
331 2002-05-21  Lawrence Pit  <loz@cable.a2000.nl>
332
333         * ArrayList.cs: Fixed bug where a capacity of 0 could be reached, 
334         thereby causing problems when trying to add elements.
335
336 2002-05-06  Duncan Mak  <duncan@ximian.com>
337
338         * Queue.cs (TrimToSize): Implemented.
339         
340 2002-05-05  Nick Drochak  <ndrochak@gol.com>
341
342         * ArrayList.cs: Throw RankException when constructing from a 
343         multi-dimensional array. Confirmed behavior from MS.NET
344
345 Thu May 2 15:18:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
346
347         * ArrayList.cs: make mcs compile again: it's allowed to
348         call arraylist.CopyTo(array, 0) when the length of the array
349         is also 0.
350
351 Wed May 1 17:05:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
352
353         * SortedList.cs: fix RemoveAt () to use the correct length in
354         Array.Copy.
355
356 2002-05-01  Nick Drochak  <ndrochak@gol.com>
357
358         * ArrayList.cs (Add & AddRange) : Throw exceptions where needed.
359
360 2002/05/01  Nick Drochak <ndrochak@gol.com>
361
362         * ArrayList.cs (CopyTo) : Check parameters and throw exceptions
363         where needed.
364
365 2002/04/30  Nick Drochak <ndrochak@gol.com>
366
367         * ArrayList.cs (Clear) : Throw exception if ReadOnly or FixedSize.
368                 (InsertRange) : Implement.
369                 (SetRange) : Implement.
370
371 2002-04-30  Nick Drochak  <ndrochak@gol.com>
372
373         * ArrayList.cs (TrimToSize) : Implement.
374
375 2002-04-28  Duncan Mak  <duncan@ximian.com>
376
377         * ArrayList.cs (InsertRange): 
378         (SetRange):
379         (Remove):
380         (TrimToSize): Throw exceptions where needed.
381
382 2002-04-29  Nick Drochak  <ndrochak@gol.com>
383
384         * Hashtable.cs (CopyTo): Throw exceptions where needed.
385
386 2002-04-28  Duncan Mak  <duncan@ximian.com>
387
388         * ArrayList.cs (ReadOnly):
389         (IList.ReadOnly): Implemented.
390
391         (Synchronized):
392         (IList.Synchronized): Implemented.
393
394         (ixedSize):
395         (IList.FixedSize): Implemented.
396
397 2002-03-24  Duncan Mak  <duncan@ximian.com>
398
399         * SortedList.cs (Synchronized): Stubbed out a missing method
400         pointed out by Jakk Simm's test suite.
401
402 2002-03-14  Nick Drochak  <ndrochak@gol.com>
403
404         * ArrayList.cs (FixedSize(ArrayList)): should return an ArrayList. The
405         other FixedSize() methods returns an IList.
406
407 2002-03-13  Duncan Mak  <duncan@ximian.com>
408
409         * ArrayList.cs (FixedSize): Changed the return type to IList if
410         the argument is an IList.
411         (Synchronized): Ditto here.
412
413 2002-03-08  Sergey Chaban <serge@wildwestsoftware.com>
414
415         * Hashtable.cs: Fixed ToPrime () bug. Removed ALLOC_GRAIN.
416         Removed unused code from static constructor.
417         GetObjectData () - Version is the same as modificationCount.
418
419 2002-02-20  Nick Drochak  <ndrochak@gol.com>
420
421         * ArrayList.cs: Add MonoTODO's where necessary. Fix bugs discovered
422         by Bucky's tests. Implement a couple of things that were left undone.
423
424 Mon Feb 11 19:49:25 CET 2002 Paolo Molaro <lupus@ximian.com>
425
426         * ArrayList.cs: Dick's fix to contructor.
427
428 2002-02-07  Duncan Mak  <duncan@ximian.com>
429
430         * Hashtable.cs: Implemented parts of the ISerializable
431         interface. GetObjectData () is good, but serialization constructor
432         needs some more love.
433
434 Sat Jan 5 15:56:54 CET 2002 Paolo Molaro <lupus@ximian.com>
435
436         * Hashtable.cs: the IDictionaryEnumerator returns DictionaryEntries.
437
438 2002-01-04  Ravi Pratap  <ravi@ximian.com>
439
440         * Correct name to MonoTODO everywhere.
441
442 2002-01-04  Ravi Pratap  <ravi@ximian.com>
443
444         * ArrayList.cs : Setting an index does not implicitly
445         extend the arraylist : remove FIXME.
446
447         Decorate incomplete elements with the TODO attribute.
448
449         * BitArray.cs : Insert TODO attributes where appropriate.
450
451         * CaseInsensitiveHashcodeProvider.cs: Ditto.
452
453         * Hashtable.cs, SortedList.cs : Ditto.
454         
455 Thu Dec 13 20:17:08 CET 2001 Paolo Molaro <lupus@ximian.com>
456
457         * ArrayList.cs: implemented AddRange(), CopyTo().
458
459 2001-11-19  Miguel de Icaza  <miguel@ximian.com>
460
461         * DictionaryBase.cs: Implemented.
462
463 Wed Nov 14 16:45:49 CET 2001 Paolo Molaro <lupus@ximian.com>
464
465         * ArrayList.cs: implement ArrayListEnumerator.
466         * Hashtable.cs: hardcode the prime number table.
467
468 2001-11-06 Nick Drochak <ndrochak@gol.com>
469         * Queue.cs: Fixes from Ricardardo.  QueueTest also updated.
470
471 2001-11-04 Nick Drochak <ndrochak@gol.com>
472         * Queue.cs: Fixed small syntax errors that were preventing the compile.
473         I changed the build file to include Queue.cs as well.
474
475 2001-11-04 Nick Drochak <ndrochak@gol.com>
476         * ArrayList.cs: Fixed "off by one" error when shifting left the array when
477         items are removed.
478
479         * CollectionBase.cs: Added OnValidate(), OnRemove() and OnRemoveComplete()
480         hook methods to the RemoveAt() method.
481
482 2001-11-04 Nick Drochak <ndrochak@gol.com>
483         * ArrayList.cs: Added private enumerator class and make GetEnumerator()
484         methods return an instance of it.
485
486 Tue Sep 25 18:52:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
487
488         * ArrayList.cs: fix Insert () to check capacity, not count.
489
490 Tue Sep 25 16:54:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
491
492         * DictionaryEntry.cs: added.
493
494 2001-08-10  Dietmar Maurer  <dietmar@ximian.com>
495
496         * common.src: removed duplicate entries
497
498 2001-08-08 Nick Drochak <ndrochak@gol.com>
499
500          * ReadOnlyCollectionBase.cs: Initialized private member.
501          * CollectionBase.cs: Initialized private member.
502          * common.src : Added ReadOnlyCollectionBase.cs and CollectionBase.cs
503          * /mcs/class/makefile: Used $(SYSTEMROOT) instead of hard coded //c/winnt
504          * /mcs/makefile: Used $(SYSTEMROOT) instead of hard coded //c/winnt
505
506 2001-08-08 Nick Drochak <nick@jobdragon.com>
507
508          * CollectionBase.cs: Add
509          * ReadOnlyCollectionBase.cs: Add
510          * CollectionBaseTest.cs: Add
511          * ReadOnlyCollectionBaseTest.cs: Add
512
513 2001-07-31 Garrett Rooney <rooneg@electricjellyfish.net>
514
515         * StackTest.cs: Add Test case for System.Collections.Stack.  
516         Contributed by Chris Hynes <chrish@assistedsolutions.com>
517
518 2001-07-30 Garrett Rooney <rooneg@electricjellyfish.net>
519
520         * Stack.cs: Clone() doesn't need to check if it's synchronized, since 
521         we override it in SyncStack anyway...  
522
523         * Stack.cs: Pop() now shrinks the array if we drop below 1/4 full, to 
524         avoid using massive amounts of memory that are not necessary.  We only 
525         drop to half the current size, which I hope will avoid the 'ping-pong' 
526         effect.
527
528         * Stack.cs: SyncStack.IsReadOnly should return stack.IsReadOnly 
529         instead of just returning false, since we may have a ReadOnly wrapper 
530         in the future (although i can't imagine why).  Thanks to David 
531         Menestrina <dmenest@yahoo.com> for pointing this out.
532
533 2001-07-23  Sergey Chaban <serge@wildwestsoftware.com>
534
535         *  Hashtable.cs: Fixed bug in Clear(), the Count wasn't zeroed.
536            From now, Clear() increases modification count.
537            Fixed HCP bug in GetHash(object) - hcp.GetHashCode() was used
538            instead of hcp.GetHashCode(key). This was resulted in the
539            insanely long lookup times when HashCodeProvider was used to
540            construct Hashtable. Added thread-safe wrapper.
541
542 2001-07-16  David Menestrina <dmenest@yahoo.com>
543
544          * BitArray.cs: Add
545          * BitArrayTest.cs: Add
546
547 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
548
549         * IDictionary.cs (Collections): IDictionary implements ICollection
550         as well.  Thanks Sergey!
551
552 2001-07-18  Garrett Rooney  <rooneg@electricjellyfish.net>
553
554         * Stack.cs Removed unnecessary locking from many methods of 
555         SyncStack, removed SyncEnumerator because it was unnecessary, 
556         added a modCount member to Stack and Stack.Enumerator, to 
557         ensure that the Stack has not been modified out form under the 
558         Enumerator, and changed the Enumerator to use a reference to the 
559         stack rather than copying over the contents array.
560
561 2001-07-17  David Menestrina  <dmenest@yahoo.com>
562
563         * Added implementation of BitArray.
564
565 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
566
567         * Hashtable.cs: Removed call to d.Count in the Hashtable
568         constructor that takes an IDictionary as IDictionary does not
569         provide a Count field.
570
571 2001-07-15  Sean MacIsaac  <macisaac@ximian.com>
572
573         * IDictionary.cs: Clear was clear.
574
575 2001-07-13  Miguel de Icaza  <miguel@ximian.com>
576
577         * All files: Renamespace things to System.
578
579 2001-07-05  Vladimir Vukicevic  <vladimir@ximian.com>
580
581         * ArrayList.cs: initial checkin and implementation
582
583         * ICollection.cs, IComprarer.cs, IDictionary.cs,
584           IDictionaryEnumerator.cs, IEnumerable.cs, IHashCodeProvider.cs,
585           IList.cs: initial checkin