1. 11 Dec, 2000 1 commit
    • Makefile.am: Add HashSet.java and java/lang/ref classes. · 488d42af
      	* Makefile.am: Add HashSet.java and java/lang/ref classes.
      	Remove BasicMapEntry.java and Bucket.java.
      	* Makefile.in: Rebuilt.
      	* java/util/HashMap.java: Rewritten.
      	* java/util/HashSet.java: Imported from classpath.
      	* java/util/WeakHashMap.java: Imported from classpath.
      	* java/util/Hashtable.java: Rewritten based on new HashMap code.
      	* java/util/Bucket.java: Deleted.
      	* java/util/BasicMapEntry.java: Deleted.
      	* java/util/Collections.java (search): Use a for-loop, not iterator
      	hasNext().
      	(copy): Use a for-loop. Throw an IndexOutOfBoundsException if run out
      	of elements in source.
      	(max): Use a for-loop.
      	(min): Ditto.
      	(reverse): Keep track of positions instead of using Iterator's
      	nextIndex() and previousIndex().
      	(shuffle(List)): Initialize defaultRandom if required using
      	double-check thread safety idiom. Call two-argument shuffle method
      	using defaultRandom.
      	(defaultRandom): New field.
      	(shuffle(List, Random)): Use a for-loop. Keep track of pos instead
      	of using previousIndex() and nextIndex().
      	(singletonMap(iterator)): Use a HashMap.Entry, not BasicMapEntry.
      	* java/util/AbstractCollection.java (toString): Use a StringBuffer.
      	* java/util/AbstractMap.java (toString): Use StringBuffer.
      	* java/lang/ref/PhantomReference.java: Imported from classpath.
      	* java/lang/ref/SoftReference.java: Ditto.
      	* java/lang/ref/Reference.java: Ditto.
      	* java/lang/ref/WeakReference.java: Ditto.
      	* java/lang/ref/ReferenceQueue.java: Ditto.
      
      From-SVN: r38183
      Bryce McKinlay committed
  2. 29 Oct, 2000 1 commit
    • AbstractCollection.java (addAll): Use size() instead of hasNext() in iterator loop. · 3a737578
      2000-10-29  Bryce McKinlay  <bryce@albatross.co.nz>
      
      	* java/util/AbstractCollection.java (addAll): Use size() instead of
      	hasNext() in iterator loop.
      	(clear): Ditto.
      	(contains): Ditto. Simplify loop.
      	(containsAll): Ditto.
      	(remove): Ditto.
      	(removeAll): Ditto.
      	(retainAll): Ditto.
      	(toArray): Ditto.
      	(toString): Ditto. Use string concatenation operators, not
      	StringBuffer.
      	* java/util/AbstractList.java (addAll): Use size() instead of
      	hasNext() in iterator loop.
      	(equals): Ditto.
      	(hashCode): Ditto.
      	(indexOf): Ditto. Don't take null check outside of the loop.
      	(iterator): Return an AbstractListItr instead of anonymous class.
      	(lastIndexOf): Use a for loop bounded by size() instead of
      	hasPrevious() in iterator loop.
      	(listIterator): Return an AbstractListItr.
      	(removeRange): Remove bounds checking code and docs.
      	(AbstractListItr): New inner class. Code moved here from
      	listIterator().
      	(SubList.iterator): Removed. Use default implementation from
      	AbstractList instead.
      	(SubList.listIterator): As above.
      	* java/util/AbstractMap.java (clear): Use a for loop bounded by size()
      	instead of hasNext() in iterator loop.
      	(containsValue): Ditto.
      	(equals): Ditto.
      	(get): Ditto.
      	(put): Ditto.
      	(putAll): Ditto.
      	(remove): Ditto.
      	(toString): Ditto. Use string concatenation operators, not
      	StringBuffer.
      	* java/util/AbstractSequentialList.java (addAll): Use a for loop
      	bounded by size() instead of hasNext() in iterator loop.
      	* java/util/AbstractSet.java (hashCode): Don't catch exception as
      	part of normal execution flow. Do an explicit null check instead.
      	* java/util/ArrayList.java (_iSize): Rename to `size'.
      	(_arData): Rename to `data'.
      	(get): Check lower bounds also. Simplify IndexOutOfBoundsException
      	message.
      	(remove): Ditto.
      	(removeRange): Make protected. Don't check bounds.
      	(add): Check lower bounds also. Simplify IndexOutOfBoundsException
      	message.
      	(addAll (Collection)): Use a size-bounded for loop instead of hasNext()
      	check.
      	(addAll (int, Collection)): Check lower bounds. Simplify exception
      	string.
      	(clone): Clone the data array too.
      	(indexOf): Inline doesEqual().
      	(lastIndexOf): Ditto.
      	(clear): Don't set array data to null.
      	(set): Check lower bounds. Simplify exception string.
      	(toArray): Correct comment.
      	(trimToSize): Don't update modCount, this is not a structural change.
      	Add comment.
      
      	* java/util/BitSet.java: Merged with classpath, new JDK 1.2 methods
      	implemented.
      	(toString): Declare `bit' as long, not int.
      	(data): Made package-private, not private.
      
      From-SVN: r37116
      Bryce McKinlay committed
  3. 23 Oct, 2000 1 commit
  4. 19 Aug, 2000 1 commit
    • Attributes.java, [...]: Imported from Classpath. · a729a4e9
      Sat Aug 19 11:00:53 2000  Anthony Green  <green@redhat.com>
      
      	* java/util/jar/Attributes.java, java/util/jar/JarEntry.java,
      	java/util/jar/JarException.java, java/util/jar/JarFile.java,
      	java/util/jar/JarInputStream.java,
      	java/util/jar/JarOutputStream.java, java/util/jar/Manifest.java,
      	java/util/Set.java, java/util/Map.java, java/util/Bucket.java,
      	java/util/AbstractSet.java, java/util/BasicMapEntry.java,
      	java/security/cert/CRL.java, java/security/cert/CRLException.java,
      	java/security/cert/Certificate.java,
      	java/security/cert/CertificateEncodingException.java,
      	java/security/cert/CertificateException.java,
      	java/security/cert/CertificateExpiredException.java,
      	java/security/cert/CertificateFactory.java,
      	java/security/cert/CertificateFactorySpi.java,
      	java/security/cert/CertificateNotYetValidException.java,
      	java/security/cert/CertificateParsingException.java,
      	java/security/cert/X509CRL.java,
      	java/security/cert/X509CRLEntry.java,
      	java/security/cert/X509Certificate.java,
      	java/security/cert/X509Extension.java: Imported from Classpath.
      	* java/util/Hashtable.java: Imported from Classpath.
      
      	* java/util/zip/ZipInputStream.java: Create stub for
      	createZipEntry.
      
      	* gcj/javaprims.h: Updated class list.
      
      	* Makefile.in, gcj/Makefile.in: Rebuilt.
      	* Makefile.am (ordinary_java_source_files): Add these new classes.
      
      From-SVN: r35809
      Anthony Green committed