aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util
AgeCommit message (Collapse)AuthorFilesLines
2002-01-22Add license clarification.Mark Wielaard83-415/+1328
From-SVN: r49104
2002-01-19ZipOutputStream.java (putNextEntry): Clear uncompressed_size in readiness ↵Per Bothner1-0/+1
for next entry. * java/util/zip/ZipOutputStream.java (putNextEntry): Clear uncompressed_size in readiness for next entry. From-SVN: r49014
2002-01-16IdentityHashMap.java (IdentityHashMap): Removed commented code.Tom Tromey1-4/+2
* java/util/IdentityHashMap.java (IdentityHashMap): Removed commented code. (hash): Correctly compute initial value for `h'. From-SVN: r48925
2001-12-15Collections drop from Classpath:Bryce McKinlay24-6122/+11216
2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/BitSet.java (and): Fix off-by-one bug, don't skip part of the bitset. (andNot): Likewise. (xor): Likewise. 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/LinkedList.java (LinkedListItr.add): Don't skip the next entry. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/TreeMap.java (removeNode): Fix bug in node removal. 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/AbstractCollection.java (containsAll): Use size of the correct collection for loop bound. * java/util/AbstractList.java (iterator.next): Increment pos after calling get on backing list. (listIterator.next): Likewise. * java/util/LinkedList.java (addLastEntry): Don't increment size before checking for size == 0. (addFirstEntry): Rearrange to match addLastEntry. (add): Do not increment size before inserting the new entry. * java/util/AbstractCollection.java (addAll): Use size of the correct collection for loop bound. 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/AbstractSet.java (removeAll): Fix scoping thinko. * java/util/HashMap.java (putAllInternal): Set size here. * java/util/Hashtable.java (putAllInternal): New method. Copy contents of a map efficiently without calling put() or putAll(). (Hashtable (map)): Use putAllInternal. (clone): Likewise. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/Collections.java: * java/util/Vector.java: * java/util/WeakHashMap.java: Fix spelling errors. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/AbstractCollection.java (removeAllInternal), (retainAllInternal): Add hooks for use by ArrayList. * java/util/AbstractList.java: Minor code updates. Fix some scoping. * java/util/AbstractMap.java: ditto * java/util/ArrayList.java (readObject, writeObject): ditto (removeAllInternal, retainAllInternal): Optimize. * java/util/Arrays.java: ditto * java/util/Collections.java: ditto. Change order of parameters to equals(Object, Object) to match specs. * java/util/Dictionary.java: Improve javadoc. (Dictionary): Add explicit constructor. * java/util/HashMap.java: Improve javadoc. Rearrange methods to follow order in JDK. Cleanups related to recent code migration to AbstractMap. Fix some scoping. (entrySet): Cache the result. (modCount): Ensure that this is updated correctly. * java/util/HashSet.java: Improve javadoc. Fix some scoping. (init): Add hooks for LinkedHashSet. (map): Use "" instead of Boolean.TRUE in backing map. Use package-private API where possible for less overhead. (readObject, writeObject): Fix serialization. * java/util/Hashtable.java: Improve javadoc. Fix some scoping. (entrySet, keySet, values): Cache the result. (modCount): Ensure that this is updated correctly. (contains, remove): Fix NullPointer checking to match specs. (class Enumeration): Make more like HashIterator. * java/util/IdentityHashMap.java: Minor code updates. (modCount): Ensure that this is updated correctly. (readObject, writeObject): Fix serialization. * java/util/LinkedHashMap.java: Minor code updates. Cleanups related to recent code migration to AbstractMap. * java/util/LinkedHashSet.java: New file. * java/util/LinkedList.java: (readObject, writeObject): Fix serialization. * java/util/Makefile.am: List recently added files. * java/util/Stack.java: Minor code updates. * java/util/TreeMap.java: Improve javadoc. Overhaul the class to be more efficient. Fix some scoping. Rearrange the methods. (nil): Ensure that this can be thread-safe, and make it a static final. Initialize it to be more useful as a sentinal node. (Node): Specify color in constructor. (deleteFixup, insertFixup): Improve comments and algorithm. (fabricateTree): Redesign with less overhead. (lowestGreaterThan): Add parameter first to make SubMap easier. (removeNode): Patch hole where nil was being modified. Choose predecessor instead of successor so in-place swap works. (class VerifyResult, verifyTree, verifySub, verifyError): Remove this dead code after verifying the class works. (class SubMap): Rewrite several algorithms to avoid problems with comparing nil. * java/util/TreeSet.java: Improve javadoc. Fix some scoping. (clone): Fix ClassCastException when cloning subSet(). (readObject, writeObject): Fix serialization. * java/util/WeakHashMap.java: Improve javadoc. Fix some scoping. (NULL_KEY): Make it compare as null, for ease elsewhere. (Class WeakEntry): Rename from Entry, to avoid shadowing Map.Entry. Add missing toString. (modCount): Ensure that this is updated correctly. (clear, containsValue, keySet, putAll, values, WeakHashMap(Map)): Add missing methods and constructor. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/ArrayList.java (checkBoundExclusive), (checkBoundInclusive): Rename from range??clusive, to match AbstractList. * java/util/LinkedList.java (checkBoundsExclusive), (checkBoundsInclusive): ditto * java/util/Vector.java (checkBoundExclusive), (checkBoundInclusive): Move bounds checking into common methods. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/AbstractList.java: (modCount): Make sure it is updated in all needed places. * java/util/ArrayList.java: Improve javadoc. Implements RandomAccess. Add serialVersionUID. Reorder methods. (modCount): Make sure it is updated in all needed places. (rangeExclusive, rangeInclusive): Add common methods for bounds check. (isEmpty): Add missing method. * java/util/Collections.java: (class SynchronizedList): Make package visible. * java/util/ConcurrentModificationException.java: Improve javadoc. * java/util/EmptyStackException.java: Improve javadoc. * java/util/LinkedList.java: Improve javadoc. (modCount): Make sure it is updated in all needed places. (rangeExclusive, rangeInclusive): Add common methods for bounds check. * java/util/NoSuchElementException.java: Improve javadoc. * java/util/Stack.java: Improve javadoc. Fix synchronization issues. (modCount): Make sure it is updated in all needed places. * java/util/Vector.java: Improve javadoc. Fix synchronization issues. Implements RandomAccess. Reorder methods. (modCount): Make sure it is updated in all needed places. (setSize): Fix according to specifications: this does not dictate the backing array size. (removeAll, retainAll): Faster implementations. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/BitSet.java: Improve javadoc. (cardinality(), clear(), clear(int, int), flip(int)), (flip(int, int), get(int, int), intersects(BitSet), isEmpty()), (nextClearBit(int), nextSetBit(int), set(int, boolean)), (set(int, int), set(int, int, boolean)): Add new JDK 1.4 methods. (clone): Fix so subclasses clone correctly. 2001-12-15 Eric Blake <ebb9@email.byu.edu> * java/util/AbstractCollection.java: Improve javadoc. (AbstractCollection()): Make constructor protected. (equals(Object, Object), hashCode(Object)): Add utility methods. * java/util/AbstractList.java: Improve javadoc. (AbstractList()): Make constructor protected. (indexOf(Object)): Call listIterator(), not listIterator(int). (iterator()): Follow Sun's requirement to not use listIterator(0). (listIterator(int)): Make AbstractListItr anonymous. (subList(int, int)): Add support for RandomAccess. (SubList.add(int, Object), SubList.remove(Object)): Fix bug with modCount tracking. (SubList.addAll(Collection)): Add missing method. (SubList.listIterator(int)): Fix bugs in indexing, modCount tracking. (class RandomAccessSubList): Add new class. * java/util/AbstractMap.java: Improve javadoc. (keys, values, KEYS, VALUES, ENTRIES): Consolidate common map fields. (AbstractMap()): Make constructor protected. (equals(Object, Object), hashCode(Object)): Add utility methods. (equals(Object)): Change algorithm to entrySet().equals(m.entrySet()), as documented by Sun. (keySet(), values()): Cache the collections. * java/util/AbstractSequentialList.java: Improve javadoc. (AbstractSequentialList()): Make constructor protected. * java/util/AbstractSet.java: Improve javadoc. (AbstractSet()): Make constructor protected. (removeAll(Collection)): Add missing method. * java/util/Arrays.java: Improve javadoc, rearrange method orders. (defaultComparator): Remove, in favor of Collections.compare(Object, Object, Comparator). (binarySearch, equals, sort): Fix natural order comparison of floats and doubles. Also improve Object comparison - when comparator is null, use natural order. (fill, sort): Add missing checks for IllegalArgumentException. (sort, qsort): Fix sorting bugs, rework the code for more legibility. (mergeSort): Inline into sort(Object[], int, int, Comparator). (class ArrayList): Rename from ListImpl, and make compatible with JDK serialization. Add methods which more efficiently override those of AbstractList. * java/util/Collections: Improve javadoc. (isSequential(List)): Add and use a method for deciding between RandomAccess and sequential algorithms on lists. (class Empty*, class Synchronized*, class Unmodifiable*): Make compliant with JDK serializability. (class Singleton*, class CopiesList, class RevereseComparator), (class UnmodifiableMap.UnmodifiableEntrySet), (class *RandomAccessList): New classes for serial compatibility. (class Empty*, class Singleton*, class CopiesList): Add methods which more efficiently override those of Abstract*. (search): Inline into binarySearch(List, Object, Comparator). (binarySearch): Make sequential search only do log(n) comparisons, instead of n. (copy(List, List)): Do bounds checking before starting. (indexOfSubList, lastIndexOfSubList, list, replaceAll, rotate), (swap): Add new JDK 1.4 methods. (binarySearch, max, min, sort): Allow null comparator to represent natural ordering. (reverse(List)): Avoid unnecessary swap. (shuffle(List, Random)): Do shuffle in-place for RandomAccess lists. (SingletonList.get): Fix logic bug. (SingletonMap.entrySet): Make the entry immutable, and cache the returned set. (SynchronizedCollection, SynchronizedMap, UnmodifiableCollection), (UnmodifiableMap): Detect null pointer in construction. (SynchronizedMap, UnmodifiableMap): Cache collection views. * java/util/BasicMapEntry: Improve javadoc. From-SVN: r48035
2001-11-16Timer.java (TaskQueue.isStopped): Remove method.Mark Wielaard1-11/+10
* java/util/Timer.java (TaskQueue.isStopped): Remove method. (Scheduler.run): Try to re-schedule task and ignore exception if queue has been stopped. From-SVN: r47093
2001-11-14Re-merges with Classpath, from various people:Tom Tromey3-14/+41
* java/lang/Double.java (parseDouble): Fixed ordering of modifiers. * java/lang/reflect/AccessibleObject.java: Javadoc, reindented. * java/lang/reflect/Member.java: Reindented. * java/lang/reflect/Modifier.java: Reindented. (toString): Only trim trailing space if text was added to StringBuffer. * java/util/ConcurrentModificationException.java: Javadoc updates. * java/util/EmptyStackException.java: Likewise. * java/util/NoSuchElementException.java: Likewise. From-SVN: r47018
2001-11-13re PR libgcj/4859 (java.util.Timer class throw IllegalStateException on ↵Tom Tromey1-2/+11
cancel()) Fix for PR libgcj/4859: * java/util/Timer.java (TaskQueue.isStopped): New method. (Scheduler.run): Don't re-schedule task if queue has been stopped. From-SVN: r46994
2001-11-05* java/util/ResourceBundle.java (class Security): Now static.Bryce McKinlay1-1/+1
From-SVN: r46781
2001-11-04ResourceBundle.java (getClassContext): Removed.Bryce McKinlay2-56/+36
* java/util/ResourceBundle.java (getClassContext): Removed. (Security): New class, extends SecurityManger. (getBundle): Use Security.getCallingClassLoader instead of getClassContext. * java/util/natResourceBundle.cc: Removed. From-SVN: r46761
2001-11-03natResourceBundle.cc (getClassContext): return array of Class instead of ↵Hans Boehm1-1/+1
array of ClassLoader. 2001-11-02 Hans Boehm <Hans_Boehm@hp.com> * java/util/natResourceBundle.cc:getClassContext: return array of Class instead of array of ClassLoader. From-SVN: r46727
2001-10-31HACKING, [...]: Fix spelling errors.Joseph Myers13-31/+31
* HACKING, gnu/gcj/xlib/Pixmap.java, gnu/gcj/xlib/XException.java, gnu/java/rmi/rmic/RMIC.java, java/awt/Window.java, java/awt/AWTEvent.java, java/io/ByteArrayOutputStream.java, java/io/CharConversionException.java, java/io/PipedInputStream.java, java/io/PipedReader.java, java/io/PrintWriter.java, java/io/WriteAbortedException.java, java/io/natFileWin32.cc, java/lang/Class.h, java/lang/natClassLoader.cc, java/lang/natObject.cc, java/lang/Package.java, java/net/BindException.java, java/net/ConnectException.java, java/net/ProtocolException.java, java/net/SocketException.java, java/net/UnknownServiceException.java, java/security/cert/X509Certificate.java, java/security/interfaces/DSAKey.java, java/security/SecureRandom.java, java/security/SignedObject.java, java/sql/DatabaseMetaData.java, java/text/DecimalFormatSymbols.java, java/util/jar/Attributes.java, java/util/jar/JarEntry.java, java/util/jar/JarInputStream.java, java/util/jar/JarOutputStream.java, java/util/Calendar.java, java/util/Collections.java, java/util/GregorianCalendar.java, java/util/HashMap.java, java/util/List.java, java/util/Properties.java, java/util/Timer.java, java/util/Vector.java, java/util/WeakHashMap.java, javax/naming/NamingException.java, testsuite/libjava.lang/Thread_Wait.java, org/xml/sax/helpers/DefaultHandler.java, org/xml/sax/HandlerBase.java, org/xml/sax/SAXParseException.java, ChangeLog, acinclude.m4, aclocal.m4, posix-threads.cc: Fix spelling errors. * configure: Regenerate. From-SVN: r46665
2001-10-29re PR libgcj/4728 (java.util.zip.GZIPOutputStream.write(int) doesn't update CRC)Tom Tromey1-1/+7
* java/util/zip/GZIPOutputStream.java (write(int)): New method. Fixes PR libgcj/4728. From-SVN: r46618
2001-10-26Adler32.java: Use correct class name.Tom Tromey1-1/+1
* java/util/zip/Adler32.java: Use correct class name. (Re-merge from Classpath.) From-SVN: r46561
2001-10-24PropertyResourceBundle.java (handleGetObject): Now public.Tom Tromey2-4/+4
* java/util/PropertyResourceBundle.java (handleGetObject): Now public. * java/util/ListResourceBundle.java (handleGetObject): Now public and final, per spec. From-SVN: r46452
2001-10-23GregorianCalendar.java (getGregorianChange): Removed `date' argument.Tom Tromey1-1/+1
* java/util/GregorianCalendar.java (getGregorianChange): Removed `date' argument. From-SVN: r46423
2001-10-16javaprims.h: Updated class list.Tom Tromey1-392/+612
* gcj/javaprims.h: Updated class list. * java/util/Hashtable.java: Re-merged with Classpath. From-SVN: r46295
2001-10-16[multiple changes]Bryce McKinlay13-612/+2114
2001-10-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/util/HashMap.java (HashEntry.clone): Removed. (HashMap(Map)): Use putAllInternal. (clone): Likewise. (putAllInternal): New method. Efficient counterpart to putAll which does not call put(). * java/util/LinkedHashMap.java (rethread): Removed. (putAllInternal): New method. Clear "head" and "tail". (addEntry): New argument "callRemove". Don't call removeEldestEntry() if callRemove == false. * Makefile.am: Add new classes RandomAccess and LinkedHashMap. * Makefile.in: Rebuilt. 2001-10-15 Eric Blake <ebb9@email.byu.edu> * java/util/Collection.java: Updated javadoc. * java/util/Comparator.java: Updated javadoc. * java/util/Enumeration.java: Updated javadoc. * java/util/Iterator.java: Updated javadoc. * java/util/List.java: Updated javadoc. * java/util/ListIterator.java: Updated javadoc. * java/util/Map.java: Updated javadoc. * java/util/RandomAccess.java: New file. * java/util/Set.java: Updated javadoc. * java/util/SortedMap.java: Updated javadoc. * java/util/SortedSet.java: Updated javadoc. From-SVN: r46277
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