aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util
AgeCommit message (Collapse)AuthorFilesLines
2001-10-05Adler32.java: Merge with ClasspathMark Wielaard5-52/+126
* java/util/zip/Adler32.java: Merge with Classpath * java/util/zip/CRC32.java: Ditto * java/util/zip/Checksum.java: Ditto * java/util/zip/DataFormatException.java: Ditto * java/util/zip/ZipException.java: Ditto From-SVN: r46035
2001-10-04SequenceInputStream.java: Merge with ClasspathMark Wielaard1-7/+15
* java/io/SequenceInputStream.java: Merge with Classpath * java/io/StringBufferInputStream.java: Ditto * java/util/Collections.java: Remerge with Classpath From-SVN: r46005
2001-09-27IdentityHashMap.java (containsKey): Use getHash.Tom Tromey1-11/+18
* java/util/IdentityHashMap.java (containsKey): Use getHash. (get): Likewise. (put): Likewise. (remove): Likewise. (getHash): New method. (tombstone, emptyslot): Now static final. (put): Correctly determine when to rehash, and correctly rehash. (containsKey, remove): Test against table length with `>='. From-SVN: r45841
2001-09-27Configuration.java.in (INIT_LOAD_LIBRARY): New constant.Tom Tromey1-0/+9
* gnu/classpath/Configuration.java.in (INIT_LOAD_LIBRARY): New constant. * java/io/StreamTokenizer.java, java/util/ResourceBundle.java: Re-merged with Classpath. From-SVN: r45835
2001-09-15TimeZone.java: Updated list of timezones from Classpath.Tom Tromey1-2/+8
* java/util/TimeZone.java: Updated list of timezones from Classpath. From-SVN: r45622
2001-09-14Hashtable.java (Enumerator): Ensure that if hasMoreElements() returns true...Bryce McKinlay1-17/+30
* java/util/Hashtable.java (Enumerator): Ensure that if hasMoreElements() returns true, nextElement() will always return something even if the table has been modified. From-SVN: r45584
2001-09-11Properties.java (load): Correctly read \u sequences.Tom Tromey1-1/+3
* java/util/Properties.java (load): Correctly read \u sequences. Report from Anthony Green. From-SVN: r45532
2001-09-07ResourceBundle fixesAnthony Green1-28/+40
From-SVN: r45472
2001-09-06* java/util/Properties.java: Re-merged from Classpath.Tom Tromey1-4/+8
From-SVN: r45442
2001-09-05* java/util/Date.java: Re-merged with Classpath.Tom Tromey1-6/+7
From-SVN: r45421
2001-09-05AbstractMap.java: Re-merged with Classpath.Tom Tromey2-3/+22
* java/util/AbstractMap.java: Re-merged with Classpath. * java/util/IdentityHashMap.java: Re-merged with Classpath. From-SVN: r45391
2001-08-31Re-merge with Classpath:Tom Tromey1-1/+10
* java/util/Comparator (equals): Added. * java/io/PipedWriter.java (write): Changed argument to `int'. * java/io/FileDescriptor.java (FileDescriptor()): New constructor. * java/io/File.java (getAbsoluteFile): Doesn't throw IOException. From-SVN: r45337
2001-08-31Makefile.in: Rebuilt.Tom Tromey12-648/+2034
* Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Removed EnumerationChain, added DoubleEnumeration. (nat_source_files): Added natResourceBundle.cc. * java/util/natResourceBundle.cc: New file. * gnu/java/util/DoubleEnumeration.java: New file. * gnu/gcj/util/EnumerationChain.java: Removed. * java/beans/VetoableChangeSupport.java: Merged with Classpath. * java/util/ResourceBundle.java: Merged with Classpath. * java/util/StringTokenizer.java: Merged with Classpath. * java/util/Locale.java: Merged with Classpath. * java/util/Random.java: Merged with Classpath. * java/util/PropertyResourceBundle.java: Merged with Classpath. * java/util/ListResourceBundle.java: Merged with Classpath. * java/util/ConcurrentModificationException.java: Re-merged with Classpath. * java/util/EmptyStackException.java: Likewise. * java/util/MissingResourceException.java: Likewise. * java/util/NoSuchElementException.java: Likewise. * java/util/TooManyListenersException.java: Likewise. From-SVN: r45335
2001-08-21IdentityHashMap.java (get): Fix off-by-one error.Jeff Sturm1-2/+2
* java/util/IdentityHashMap.java (get): Fix off-by-one error. (put): Likewise. From-SVN: r45077
2001-08-15jni.cc: Include IdentityHashMap.h, not Hashtable.h.Tom Tromey1-0/+415
* jni.cc: Include IdentityHashMap.h, not Hashtable.h. (local_ref_table, global_ref_table): Now IdentityHashMap. (_Jv_JNI_Init): Updated for new types. (mark_for_gc): Likewise. (unmark_for_gc): Likewise. * gcj/javaprims.h: Rebuilt class list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added new file. * java/util/IdentityHashMap.java: New file. From-SVN: r44929
2001-07-31* java/util/Date.java: Re-merged with Classpath.Tom Tromey1-1/+2
From-SVN: r44497
2001-07-30GregorianCalendar.java (GregorianCalendar): Call setTimeInMillis() to set ↵Bryce McKinlay1-3/+1
the default/current time. * java/util/GregorianCalendar.java (GregorianCalendar): Call setTimeInMillis() to set the default/current time. From-SVN: r44467
2001-07-26Calendar.java (set): Never recompute fields here.Bryce McKinlay2-8/+11
* java/util/Calendar.java (set): Never recompute fields here. They will already be set if someone set time explicitly, and it can cause problems to do so. Don't invalidate AM_PM setting if HOUR is set. * java/util/GregorianCalendar.java (computeTime): Don't ignore an HOUR setting if AM_PM is set. Don't try to ensure the HOUR value is sane. * java/text/SimpleDateFormat.java (defaultCentury): New field. (readObject): Call set2DigitYearStart if appropriate so that defaultCentury is calculated. (SimpleDateFormat): Don't bother clearing calendar here. Call computeCenturyStart(). (set2DigitYearStart): Calculate and set defaultCentury. (format): Don't clone the calendar. Use "calendar" not "theCalendar" everywhere. (parse): Likewise. If the pattern is "y" or "yy" and it found exactly 2 numeric digits, use the 80-20 heuristic to parse the value into a default century based on defaultCenturyStart. (computeCenturyStart): Rewritten. Call set2DigitYearStart(). From-SVN: r44395
2001-07-17LinkedList.java (clone): Clear the copy list with clear(), not by setting ↵Bryce McKinlay1-8/+2
its size field. * java/util/LinkedList.java (clone): Clear the copy list with clear(), not by setting its size field. From-SVN: r44057
2001-06-14re PR libgcj/3144 (java.lang.Date.compareTo() not supported)Tom Tromey1-143/+410
Fix for PR libgcj/3144: * java/util/Date.java: Merged with Classpath. From-SVN: r43374
2001-05-15GregorianCalendar.java (computeTime): Only call getTimeZone() once.Tom Tromey1-1/+1
* java/util/GregorianCalendar.java (computeTime): Only call getTimeZone() once. From-SVN: r42121
2001-05-10[multiple changes]Tom Tromey3-357/+1041
2001-05-10 Tom Tromey <tromey@redhat.com> * java/util/GregorianCalendar.java: Imported from Classpath. * gnu/java/locale/LocaleInformation_nl.java: New file from Classpath. * gnu/java/locale/LocaleInformation_en.java: Likewise. * gnu/java/locale/LocaleInformation_de.java: Likewise. * gnu/java/locale/LocaleInformation.java: Likewise. * natGregorianCalendar.cc: Removed. * Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Removed natGregorianCalendar.cc. 2001-05-10 Tom Tromey <tromey@redhat.com> * java/text/SimpleDateFormat.java (computeCenturyStart): New method. (defaultCenturyStart): Use it. (readObject): Likewise. (SimpleDateFormat): Clear the calendar. Set the grouping on the number format. (parse): Copy the calendar before modifying it. Correctly handle the time zone. * java/util/Calendar.java (clear): Set field value(s) to 0. 2001-05-10 Jeff Sturm <jsturm@one-point.com> * Calendar.java (get): Clear areFieldsSet if requested field is not set. (set): Unset fields that depend on new value. From-SVN: r41942
2001-04-25Forgot this file on last commit.Bryce McKinlay1-3/+1
From-SVN: r41544
2001-04-20natSystem.cc (getSystemTimeZone): Adjust for DST.Warren Levy1-2/+44
* java/lang/natSystem.cc (getSystemTimeZone): Adjust for DST. * java/text/SimpleDateFormat.java (indexInArray): Removed private method. (processYear): Removed private method. (parseLenient): Removed private method. (parseLeadingZeros): Removed private method. (parseStrict): Removed private method. (expect): Added new private method. (parse): Reverted to pre-Classpath merge version with minor fixes. * java/util/natGregorianCalendar.cc (computeTime): Handle strict calendars. From-SVN: r41456
2001-04-01DeflaterOutputStream.java (deflate): Loop while def.needsInput.Per Bothner2-51/+95
* DeflaterOutputStream.java (deflate): Loop while def.needsInput. (finish): def.deflate needs to be called in a loop. (inbuf, inbufLength): New private fields. (write(int)): Use inbuf. (write(byte[],int,int): Check if pending output in inbuf. * ZipOutputStream.java: Don't use Deflater if stored. Use a Checksum object directly, not via a CheckedOutputStream. (uncompressed_size): New field, (closeEntry): Only write data_directory if needed. (write): If STORED, write directly. Always update crc, and uncompressed_size. (write_entry): Fix lots of protocol erors. From-SVN: r40988
2001-03-25exception.cc (java_eh_info): Make value type jthrowable.Richard Henderson2-18/+18
* exception.cc (java_eh_info): Make value type jthrowable. (_Jv_type_matcher): Remove now unneeded cast. (_Jv_Throw): Make argument type jthrowable. Munge name for SJLJ_EXCEPTIONS here ... * gcj/cni.h: ... not here. (JvThrow): Remove. * gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations. * defineclass.cc, interpret.cc, jni.cc, posix-threads.cc, prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc, gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc, gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc, gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc, java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc, java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc, java/lang/natClass.cc, java/lang/natClassLoader.cc, java/lang/natDouble.cc, java/lang/natObject.cc, java/lang/natPosixProcess.cc, java/lang/natRuntime.cc, java/lang/natString.cc, java/lang/natSystem.cc, java/lang/natThread.cc, java/lang/reflect/natArray.cc, java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc, java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc, java/util/zip/natInflater.cc: Use throw, not JvThrow or _Jv_Throw. From-SVN: r40838
2001-03-24HashMap.java (HashMap): If 0 is given for initialCapacity paramater, bump it ↵Bryce McKinlay2-3/+7
to 1. 2001-03-24 Bryce McKinlay <bryce@albatross.co.nz> * java/util/HashMap.java (HashMap): If 0 is given for initialCapacity paramater, bump it to 1. * java/util/Hashtable.java (Hashtable): Likewise. From-SVN: r40812
2001-03-20TimeZone.java: Sync up with Classpath.Warren Levy1-97/+103
* java/util/TimeZone.java: Sync up with Classpath. Includes new and corrected SimpleTimeZone's for the timezones hash table. From-SVN: r40650
2001-03-19ArrayList.java: Remove RCS keywords from commentsMark Wielaard12-533/+785
* java/util/ArrayList.java: Remove RCS keywords from comments * java/util/BasicMapEntry.java: idem * java/util/Dictionary.java: idem * java/util/HashSet.java: idem * java/util/EventObject.java: reindent * java/util/Properties.java: idem * java/util/SortedMap.java: idem * java/util/Enumeration.java: Merge with Classpath * java/util/EventListener.java: idem * java/util/Observable.java: idem * java/util/Observer.java: idem * java/util/Stack.java: idem From-SVN: r40639
2001-03-06TreeSet.java (writeObject): Use a for-loop instead of Iterator.hasNext().Bryce McKinlay2-11/+6
2001-03-06 Bryce McKinlay <bryce@albatross.co.nz> * java/util/TreeSet.java (writeObject): Use a for-loop instead of Iterator.hasNext(). 2001-03-05 Jochen Hoenicke <jochen@gnu.org> * java/util/TreeMap.java (writeObject): Use defaultWriteObject() instead of the new JDK1.2 API. This is simpler and makes back-porting the classes to JDK1.1 trivial. (readObject): likewise. From-SVN: r40252
2001-02-22re PR java/2040 (java.util.Hashtable(int,float) is stricter than sun's version)Bryce McKinlay2-20/+15
Fix for PR java/2040: * java/util/HashMap.java (HashMap): Don't throw exception for loadFactor > 1. Add exception messages. * java/util/Hashtable.java (Hashtable): Likewise. From-SVN: r39969
2001-02-17* java/util/TimerTask.java: New version from Classpath.Mark Wielaard1-64/+67
From-SVN: r39801
2001-02-16HashSet.java (clone): Made subclass safe, use super.clone(), not new.Bryce McKinlay1-3/+10
* java/util/HashSet.java (clone): Made subclass safe, use super.clone(), not new. From-SVN: r39746
2001-02-16TreeMap.java (nil): Made non-final.Bryce McKinlay1-2/+4
* java/util/TreeMap.java (nil): Made non-final. (clone): Create new nil node for copy. From-SVN: r39736
2001-02-16TreeSet.java (clone): Made subclass safe, use super.clone(), not new.Bryce McKinlay2-6/+22
* java/util/TreeSet.java (clone): Made subclass safe, use super.clone(), not new. * java/util/TreeMap.java (clone): Likewise. From-SVN: r39734
2001-02-15AbstractSequentialList.java: Synchronize with Classpath.Bryce McKinlay8-126/+576
* java/util/AbstractSequentialList.java: Synchronize with Classpath. * java/util/Collection.java: Likewise. * java/util/Comparator.java: Likewise. * java/util/Dictionary.java: Likewise. * java/util/Iterator.java: Likewise. * java/util/ListIterator.java: Likewise. * java/util/Map.java: Likewise. * java/util/Set.java: Likewise. From-SVN: r39708
2001-02-15* java/util/HashSet.java (clone): Remove try/catch.Bryce McKinlay1-10/+3
From-SVN: r39707
2001-02-15TreeSet.java (clone): Call TreeMap.clone(), not Object.clone().Bryce McKinlay2-19/+14
* java/util/TreeSet.java (clone): Call TreeMap.clone(), not Object.clone(). * java/util/Collections.java (ReverseComparator): New static class. (reverseOrder): Return static instance of ReverseComparator. From-SVN: r39705
2001-02-14natClass.cc (getSignature): Don't try to dereference param_types if it is null.Bryce McKinlay1-14/+11
* java/lang/natClass.cc (getSignature): Don't try to dereference param_types if it is null. Instead, take this to mean "no parameters". * java/lang/TreeMap.java (TreeIterator.next): Throw NoSuchElementException in preference to ConcurrentModificationException. (TreeIterator.remove): Throw IllegalStateException in preference to ConcurrentModificationException. (SubMap.firstKey): Do a better check for empty SubMap, and if it is, throw a NoSuchElementException. (SubMap.lastKey): Likewise. From-SVN: r39658
2001-02-14re PR libgcj/1758 (java.util package lacks TreeMap)Bryce McKinlay5-16/+1756
* java/util/TreeMap.java: New file. * java/util/TreeSet.java: New file. * Makefile.am: Add TreeMap and TreeSet. Enable WeakHashMap. * Makefile.in: Rebuilt. * java/util/HashSet.java (clone): Use constructor instead of calling clone on itself. * java/util/SortedSet.java: Sync with classpath. * java/util/HashMap.java (hash): Use if statement instead of ternary, for clarity. Resolves PR libgcj/1758. Resolves PR java/1684. From-SVN: r39657
2001-02-09* java/util/Timer.java: New version from Classpath.Tom Tromey1-429/+492
From-SVN: r39573
2001-02-07re PR java/1895 (Libjava: Arrays.sort doesn't work)Bryce McKinlay1-88/+53
* java/util/Arrays.java: Removed "cmp" methods. (qsort): Don't use "cmp". (med3): Likewise. 2001-02-07 Mark Benvenuto <mcb54@columbia.edu> * java/util/Arrays.java (qsort): Handle N value of 7 with insertion sort. Fix for PR java/1895. From-SVN: r39514
2001-01-09re PR libgcj/1411 (natTimeZone.cc should be removed)Warren Levy3-120/+52
Fix for PR libgcj/1411: * Makefile.am: Removed java/util/natTimeZone.cc. * Makefile.in: Rebuilt. * gnu/gcj/text/LocaleData_en_US.java (zoneStringsDefault): Added missing localized timezone names. * java/lang/System.java (getDefaultTimeZoneId): New private method. * java/lang/natSystem.cc (getSystemTimeZone): New private method. (init_properties): Set user.timezone property. * java/text/DateFormatSymbols.java (zoneStringsDefault): Added default timezone names; removed non-standard ones. Use standard ID names per JCL. * java/util/Date.java (toGMTString): Removed zoneGMT variable. (UTC): Ditto. * java/util/TimeZone.java: Add standard ID names per JCL; removed non-standard ones. (getDefaultTimeZoneId): Removed. (zoneGMT): Removed. (getDefaultTimeZoneId): Removed. * java/util/natTimeZone.cc: Removed. From-SVN: r38816
2000-12-28re PR libgcj/1358 (java.util.Date.toString() doesn't seem to behave properly.)Warren Levy4-15/+14
Fix for PR libgcj/1358: * java/lang/System.java: Update Copyright date properly. * java/util/Calendar.java: Fix typo in comment. (set): Set 24-hour clock hour instead of 12-hour clock hour. * java/util/GregorianCalendar.java (GregorianCalendar): Properly initialize times. Spec says to set H:M:S values to zero only if a date is given. * java/util/TimeZone.java (getDefaultDisplayName): Casts to char needed for evaluating numbers '0' to '9' in printouts of GMT offsets. * java/util/natGregorianCalendar.cc (computeTime): Properly handle timezones and GMT offsets, being careful to account for units of milliseconds vs. seconds. From-SVN: r38508
2000-12-21* java/util/zip/Deflater.java (update, init): Now private.Tom Tromey1-2/+2
From-SVN: r38420
2000-12-21BasicMapEntry.java: Re-added.Bryce McKinlay3-85/+136
* java/util/BasicMapEntry.java: Re-added. * java/util/HashMap.java (Entry): Extend BasicMapEntry. (putAll): Test for BasicMapEntry. * java/util/Hashtable.java (Entry): Extend BasicMapEntry. (putAll): Test for BasicMapEntry. Change references from `HashMap.Entry' to `Entry' in various places. * Makefile.am: Add BasicMapEntry.java. * Makefile.in: Rebuilt. From-SVN: r38410
2000-12-19GregorianCalendar.java (GregorianCalendar): Constructors need to set ↵Warren Levy1-3/+3
timezone to a valid non-null value. * java/util/GregorianCalendar.java (GregorianCalendar): Constructors need to set timezone to a valid non-null value. Partial fix for PR 331. From-SVN: r38375
2000-12-18natInflater.cc (inflate): Treat Z_BUF_ERROR as end-of-stream if avail_in is 0.Bryce McKinlay1-5/+10
* java/util/zip/natInflater.cc (inflate): Treat Z_BUF_ERROR as end-of-stream if avail_in is 0. From-SVN: r38338
2000-12-17ArrayList.java (data): Declare transient.Bryce McKinlay1-14/+6
* java/util/ArrayList.java (data): Declare transient. (serialPersistantFields): Removed. (readObject): Use defaultReadObject(), not readFields(). (writeObject): Use defaultWriteObject(), not writeFields(). From-SVN: r38328
2000-12-17Hashtable.java (put): Remove `last' variable.Jeff Sturm2-22/+14
2000-12-17 Jeff Sturm <jeff.sturm@commerceone.com> * java/util/Hashtable.java (put): Remove `last' variable. Link new entry to head of list. * java/util/HashMap.java (put): Ditto. From-SVN: r38325