aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util
AgeCommit message (Collapse)AuthorFilesLines
2002-11-03GNU Classpath merge.Mark Wielaard3-11/+13
2002-10-31 Stephen Crawley <crawley@dstc.edu.au> * java/lang/Double.java (valueOf): Return new Double(parseDouble(s)). 2002-10-31 Wu Gansha <gansha.wu@intel.com>: * java/util/ArrayList.java (readObject, writeObject): Only read/write size items. 2002-10-31 Wu Gansha <gansha.wu@intel.com>: * java/io/DataInputStream.java (convertFromUTF): Give StringBuffer an initial estimated size to avoid enlarge buffer frequently. 2002-10-31 Wu Gansha <gansha.wu@intel.com>: * java/lang/reflect/Proxy.java (ProxyType): Set loader to System ClassLoader when null. (ProxyType.hashCode): Loader null check no longer needed. (ProxyType.sameTypes): New method. (ProxyType.equals): Use new method. 2002-10-31 Mark Wielaard <mark@klomp.org> * java/net/URLDecoder.java (decode): Initialize Stringbuffer size to length of String. * java/net/URLEncoder.java (encode): Likewise. 2002-10-31 Mark Wielaard <mark@klomp.org> * java/util/zip/ZipInputStream.java (getNextEntry): Throw IOException when stream is closed. (closeEntry): Likewise. (read): Likewise. * java/util/zip/ZipOutputStream.java (putNextEntry): Throw ZipException when no entry active. (closeEntry): Likewise. (write): Likewise. From-SVN: r58772
2002-10-31ZipFile.java (readLeShort): Take and use DataInput as argument.Mark Wielaard1-39/+58
* java/util/zip/ZipFile.java (readLeShort): Take and use DataInput as argument. (readLeShort): Likewise and use byte[]. (readLeInt): Likewise. (readEntries): Use new versions of methods and use byte[] for reading a complete zip entry. Add ZipFile name to exceptions. (entries): Add ZipFile name to exceptions. (getEntry): Likewise. (checkLocalHeader): Use new versions of methods and add ZipFile name to exceptions. From-SVN: r58697
2002-10-16re PR libgcj/8234 (ZipInputStream chokes when InputStream.read() returns ↵Tom Tromey2-0/+2
small chunks) Fix for PR libgcj/8234: * java/util/zip/natInflater.cc (reset): Reset avail_in. * java/util/zip/natDeflater.cc (reset): Reset avail_in. From-SVN: r58205
2002-09-25re PR libgcj/7786 (TimeZone.getDSTSavings() from JDK1.4 not implemented)Jesse Rosenstock1-0/+16
2002-09-25 Jesse Rosenstock <jmr@ugcs.caltech.edu> * java/util/TimeZone.java (getDSTSavings): New method. Fixes PR libgcj/7786. From-SVN: r57518
2002-09-25re PR libgcj/7766 (ZipInputStream.available returns 0 immediately after ↵Jesse Rosenstock1-2/+8
construction) 2002-09-25 Jesse Rosenstock <jmr@ugcs.caltech.edu> Fix for PR libgcj/7766: * java/util/zip/ZipInputStream.java (entryAtEOF): New field. (getNextEntry): Set it. (closeEntry): Likewise. (read): Likewise. (close): Likewise. (available): Use it. From-SVN: r57513
2002-09-23re PR libgcj/6576 (java.util.ResourceBundle.getResource ignores locale)Tom Tromey1-83/+125
Fix for PR libgcj/6576: * java/util/ResourceBundle.java (tryBundle): Cache `null' if we didn't find a given bundle. (getBundle): Don't require base bundle. (setParent): Removed old comment. (tryLocalBundle): Try components even if preceding components were empty. From-SVN: r57442
2002-09-18Matcher.java, [...]: Merge with classpath, new files.Michael Koch3-0/+241
2002-09-18 Michael Koch <konqueror@gmx.de> * java/util/regex/Matcher.java, java/util/regex/Pattern.java, java/util/regex/PatternSyntaxException.java: Merge with classpath, new files. * Makefile.am (core_java_source_files): Added java/util/regex/Matcher.java, java/util/regex/Pattern.java, java/util/regex/PatternSyntaxException.java * Makefile.in: Regenerated. * include/config.h.in: Added HAVE_NET_IF_H. * java/net/natNetworkInterface.cc (getRealNetworkInterfaces): Removed #if 0 ... #endif. From-SVN: r57275
2002-08-31re PR libgcj/7785 (Calendar.getTimeInMillis/setTimeInMillis should be public)Jesse Rosenstock1-3/+5
2002-08-30 Jesse Rosenstock <jmr@ugcs.caltech.edu> * java/util/Calendar.java (getTimeInMillis, getTimeInMillis): Now public, per 1.4 spec. Fixes PR libgcj/7785. From-SVN: r56696
2002-06-18javaprims.h: Updated class declaration list.Tom Tromey1-168/+0
* gcj/javaprims.h: Updated class declaration list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Removed BasicMapEntry.java. * java/util/BasicMapEntry.java: Removed. From-SVN: r54753
2002-06-18javaprims.h: Updated class declaration list.Tom Tromey25-1068/+1693
* gcj/javaprims.h: Updated class declaration list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added PropertyPermissionCollection.java. * java/lang/Thread.java (group, name): Now package-private. * java/lang/ThreadGroup.java: Re-merge with Classpath. * java/util/AbstractList.java: Likewise. * java/util/AbstractMap.java: Likewise. * java/util/Calendar.java: Likewise. * java/util/Collections.java: Likewise. * java/util/HashMap.java: Likewise. * java/util/Hashtable.java: Likewise. * java/util/LinkedHashMap.java: Likewise. * java/util/LinkedList.java: Likewise. * java/util/List.java: Likewise. * java/util/ListResourceBundle.java: Likewise. * java/util/Map.java: Likewise. * java/util/Observable.java: Likewise. * java/util/Properties.java: Likewise. * java/util/PropertyPermission.java: Likewise. * java/util/PropertyPermissionCollection.java: Likewise. * java/util/PropertyResourceBundle.java: Likewise. * java/util/Random.java: Likewise. * java/util/SimpleTimeZone.java: Likewise. * java/util/StringTokenizer.java: Likewise. * java/util/TimerTask.java: Likewise. * java/util/TreeMap.java: Likewise. * java/util/WeakHashMap.java: Likewise. * java/util/jar/Attributes.java: Likewise. * java/util/jar/JarException.java: Likewise. * java/util/jar/Manifest.java: Likewise. From-SVN: r54743
2002-06-17javaprims.h: Updated class declaration list.Tom Tromey3-15/+110
* gcj/javaprims.h: Updated class declaration list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added new file. * java/util/EventListenerProxy.java: New file. * java/util/EventListener.java: Re-merge with Classpath. * java/util/EventObject.java: Re-merge with Classpath. From-SVN: r54720
2002-06-16RuntimeException.java: Re-merge with Classpath.Tom Tromey10-106/+143
* java/lang/RuntimeException.java: Re-merge with Classpath. * java/util/ArrayList.java: Likewise. * java/util/Arrays.java: Likewise. * java/util/BitSet.java: Likewise. * java/util/Dictionary.java: Likewise. * java/util/IdentityHashMap.java: Likewise. * java/util/MissingResourceException.java: Likewise. * java/util/Observer.java: Likewise. * java/util/TooManyListenersException.java: Likewise. * java/util/zip/DataFormatException.java: Likewise. * java/util/zip/ZipException.java: Likewise. From-SVN: r54680
2002-06-15InflaterInputStream.java (read): Loop if data has been read but none output ↵Tom Tromey8-787/+1332
by inflater. * java/util/zip/InflaterInputStream.java (read): Loop if data has been read but none output by inflater. * java/util/zip/natDeflater.cc (reset): Set is_finished. * java/util/zip/natInflater.cc (reset): Set dist_needed and is_finished. * java/util/zip/ZipOutputStream.java: Replaced with Classpath version. * java/util/zip/ZipFile.java: Replaced with Classpath version. * java/util/zip/ZipEntry.java: Replaced with Classpath version. * java/util/zip/ZipInputStream.java: Replaced with Classpath version. * java/util/zip/ZipConstants.java: Replaced with Classpath version. From-SVN: r54653
2002-06-04* java/util/natTimeZone.cc: Include <stdio.h>.Tom Tromey1-0/+2
From-SVN: r54258
2002-05-14natRuntime.cc: Don't include sys/time.h and time.h.Tom Tromey1-0/+15
* java/lang/natRuntime.cc: Don't include sys/time.h and time.h. * java/util/natTimeZone.cc: Include sys/time.h and time.h here. Include platform.h. From-SVN: r53443
2002-05-13re PR libgcj/6389 (System.getProperty("") should always throw an ↵Tom Tromey2-3/+174
IllegalArgumentException) Fixes PR libgcj/6389: * Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Added natTimeZone.cc. * java/util/natTimeZone.cc: New file. * java/util/TimeZone.java (getDefaultTimeZoneId): New method. * java/lang/System.java: Merged with Classpath. * java/lang/Runtime.java: Merged with Classpath. * java/lang/natSystem.cc (setErr0): Renamed from setErr; don't run security check. (setIn0): Renamed from setIn; don't run security check. (setOut0): Renamed from setOut; don't run security check. (file_encoding, getpwuid_adaptor, getSystemTimeZone, init_properties): Moved to natRuntime.cc. Moved many includes to natRuntime.cc. (isWordsBigEndian): New method. * java/lang/natRuntime.cc: Include Long.h, also other includes previously in natSystem.cc. (maxMemory): New function. (exitInternal): Renamed from `_exit'. (exit): Removed. (init): Don't set finalize_on_exit. (exitInternal): Use `finalizeOnExit'. (file_encoding, getpwuid_adaptor): New functions from natSystem.cc. (insertSystemProperties): New method, renamed from System::init_properties. Don't set user.timezone. (_load): Don't call checkLink. (execInternal): New method. (availableProcessors): Likewise. (nativeGetLibname): Likewise. From-SVN: r53429
2002-05-09ResourceBundle.java: New version from Classpath.Tom Tromey2-644/+765
* java/util/ResourceBundle.java: New version from Classpath. * java/util/Locale.java: Likewise. From-SVN: r53351
2002-04-08AbstractMap.java (putAll): Use entrySet size.Mark Wielaard1-5/+5
* java/util/AbstractMap.java (putAll): Use entrySet size. (toString): Explicitly use getKey() and getValue(). From-SVN: r52008
2002-04-07Hashtable.java (contains): Remove NullPointer check.Mark Wielaard1-14/+8
* java/util/Hashtable.java (contains): Remove NullPointer check. (containsValue): Add NullPointer check. (remove): Always throw NullPointerException when key is null. From-SVN: r51994
2002-04-07ArrayList.java (addAll(int,Collection)): System.arraycopy all of the ↵Mark Wielaard2-5/+17
remaining elements. * java/util/ArrayList.java (addAll(int,Collection)): System.arraycopy all of the remaining elements. * java/util/Vector.java (addAll(int,Collection)): Likewise. (removeRange): If toIndex == fromIndex do nothing, if toIndex < fromIndex throw IndexOutIfBoundsException. (removeAll): Always throw NullPointerException when collection is null. (retrainAll): Likewise. From-SVN: r51979
2002-04-06ArrayList.jva (removeRange): If toIndex == fromIndex do nothing...Mark Wielaard1-3/+7
* java/util/ArrayList.jva (removeRange): If toIndex == fromIndex do nothing, if toIndex < fromIndex throw IndexOutIfBoundsException. From-SVN: r51947
2002-04-04Arrays.java (qsort): Fix off-by-one errors and use of incorrect "hi" value ↵Bryce McKinlay1-42/+49
when count > 40. * java/util/Arrays.java (qsort): Fix off-by-one errors and use of incorrect "hi" value when count > 40. From-SVN: r51854
2002-04-02IdentityHashMap.java (put): Set new threshold correctly when resizing table.Bryce McKinlay1-1/+1
* java/util/IdentityHashMap.java (put): Set new threshold correctly when resizing table. From-SVN: r51751
2002-04-01BitSet.java (BitSet(int)): if nbits < 0 throw NegativeArraySizeExceptionMark Wielaard1-6/+9
* java/util/BitSet.java (BitSet(int)): if nbits < 0 throw NegativeArraySizeException (clear(int)): Use sign extended shift. (flip(int)): Likewise. (get(int)): Likewise. (nextClearBit(int)): Likewise. (nextSetBit(int)): Likewise. (set(int)): Likewise. From-SVN: r51701
2002-03-23re PR libgcj/6045 (GregorianCalendar: getMinimum() and getMaximum() ↵Michael Smith1-3/+3
incorrect for month) 2002-03-23 Michael Smith <msmith@spinnakernet.com> * java/util/GregorianCalendar.java (minimums, maximums): Correct MONTH entry. Fixes PR libgcj/6045. From-SVN: r51232
2002-03-03* java/util/Timer (TaskQueue.stop): set elements to zero.Mark Wielaard1-0/+1
From-SVN: r50254
2002-02-14[multiple changes]Mark Wielaard2-5/+12
2002-02-14 Mark Wielaard <mark@klomp.org> * java/math/BigInteger.java: import gnu.java.math.MPN not the whole package as a workaround for gcj 3.0.x 2002-02-14 Mark Wielaard <mark@klomp.org> * java/security/BasicPermission.java: extends with fully qualified classname as workaround for gcj 3.0.4. 2002-02-14 Eric Blake <ebb9@email.byu.edu> * java/net/DatagramSocketImpl.java (setOption, getOption): Work around gcj bug of wrong emitted qualifier for inherited method. * java/net/SocketImpl.java (setOption, getOption): Ditto. * java/util/WeakHashMap.java (WeakEntrySet): Add non-private constructor to reduce amount of emitted bytecode. While this happens to work around a jikes 1.15 bug, it is still a useful patch even for correct compilers. * java/rmi/server/RMIClassLoader.java (MyClassLoader): Ditto. * gnu/java/rmi/server/UnicastRemoteCall.java (DummyObjectOutputStream, DummyObjectInputStream): Ditto. 2002-02-14 Eric Blake <ebb9@email.byu.edu> * java/net/DatagramSocketImpl.java: Reformat (no code changes). * java/net/SocketImpl.java: Ditto. * java/rmi/server/RMIClassLoader.java: Ditto. * gnu/java/rmi/server/UnicastRemoteCall.java: Ditto. 2002-02-14 Mark Wielaard <mark@klomp.org> Thanks to Takashi Okamoto * java/util/Arrays.java (ArrayList.indexOf()): this.equals(). * java/util/Arrays.java (ArrayList.lastIndexOf()): Likewise. * java/util/WeakHashMap.java (WeakEntry.getEntry()): this.get(). From-SVN: r49778
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