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