Commit Graph

1056 Commits

Author SHA1 Message Date
Tom Tromey 0cbd398014 ThreadGroup.java (activeCount): Only include threads which are alive.
* java/lang/ThreadGroup.java (activeCount): Only include threads
	which are alive.
	(enumerate): Likewise.

From-SVN: r39922
2001-02-20 18:05:57 +00:00
Bryce McKinlay be454565be CharArrayReader.java (CharArrayReader): Throw IllegalArgumentException if constructor arguments are illegal.
* java/io/CharArrayReader.java (CharArrayReader): Throw
	IllegalArgumentException if constructor arguments are illegal.
	(ready): Return false if no more characters can be read.
	* java/io/ByteArrayInputStream.java (ByteArrayInputStream): Likewise.

From-SVN: r39876
2001-02-19 05:37:28 +00:00
Bryce McKinlay 3d1c878854 Integer.java (getInteger): Return default argument if property is not set.
* java/lang/Integer.java (getInteger): Return default argument if
	property is not set. Don't call decode with null argument.
	* java/lang/Long.java (getLong): Likewise.

From-SVN: r39870
2001-02-19 03:43:12 +00:00
Mark Wielaard 6483cbecc4 * java/util/TimerTask.java: New version from Classpath.
From-SVN: r39801
2001-02-17 15:27:34 +00:00
Mark Wielaard 3f57b973f3 Remerge with Classpath (changes by Bryce McKinlay <bryce@albatross.co.nz>)
Remerge with Classpath
    (changes by Bryce McKinlay  <bryce@albatross.co.nz>)
    * java/io/DataInputStream.java (readBoolean): Use convertToBoolean().
    (readByte): Use convertToByte().
    (readChar): Use convertToChar().
    (readInt): Use convertToInt().
    (readLong): Use convertToLong().
    (readShort): Use convertToShort().
    (readUnsignedByte): Use convertToUnsignedByte().
    (readUnsignedShort): Use convertToUnsignedShort().
    (readUTF): Use convertToUTF().

    (convertToBoolean): Resurrected.
    (convertToByte): Ditto.
    (convertToChar): Ditto.
    (convertToInt): Ditto.
    (convertToLong): Ditto.
    (convertToShort): Ditto.
    (convertToUnsignedByte): Ditto.
    (convertToUnsignedShort): Ditto.
    (convertToUTF): Ditto.

From-SVN: r39800
2001-02-17 15:09:46 +00:00
Mark Wielaard a7e96ed41a * HACKING: new file
From-SVN: r39799
2001-02-17 14:24:41 +00:00
Mark Wielaard f74fd2bbc1 DataInputStream.java: update copyright notice
* java/io/DataInputStream.java: update copyright notice
    * java/io/PrintWriter.java: idem
    * java/io/Reader.java: idem
    * java/io/StreamTokenizer.java: idem
    * java/io/StringReader.java: idem
    * java/lang/reflect/ReflectPermission.java: idem

From-SVN: r39798
2001-02-17 13:59:13 +00:00
Bryce McKinlay 3ade9bbaad HashSet.java (clone): Made subclass safe, use super.clone(), not new.
* java/util/HashSet.java (clone): Made subclass safe, use
	super.clone(), not new.

From-SVN: r39746
2001-02-16 04:50:38 +00:00
Bryce McKinlay 5ace577564 TreeMap.java (nil): Made non-final.
* java/util/TreeMap.java (nil): Made non-final.
	(clone): Create new nil node for copy.

From-SVN: r39736
2001-02-16 02:25:24 +00:00
Bryce McKinlay 07add946aa TreeSet.java (clone): Made subclass safe, use super.clone(), not new.
* java/util/TreeSet.java (clone): Made subclass safe, use
	super.clone(), not new.
	* java/util/TreeMap.java (clone): Likewise.

From-SVN: r39734
2001-02-16 01:49:40 +00:00
Andrew Haley 6472877ae0 i386-signal.h (INIT_SEGV): Use a direct system call to set the handler.
2001-02-14  Andrew Haley  <aph@redhat.com>

        * include/i386-signal.h (INIT_SEGV): Use a direct system call to
        set the handler.

From-SVN: r39724
2001-02-15 19:19:50 +00:00
Anthony Green c220009946 defineclass.cc: Don't include alloca.h.
2001-02-15  Anthony Green  <green@redhat.com>

	* defineclass.cc: Don't include alloca.h.
	(prepare_pool_entry): Convert alloca to __builtin_alloca.
	* interpret.cc (run_normal): Ditto.
        (continue1): Ditto.
	* java/lang/natDouble.cc (parseDouble): Ditto.

From-SVN: r39719
2001-02-15 14:03:14 +00:00
Bryce McKinlay 06e3b913b3 AbstractSequentialList.java: Synchronize with Classpath.
* 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 06:43:00 +00:00
Bryce McKinlay a6845c56c4 * java/util/HashSet.java (clone): Remove try/catch.
From-SVN: r39707
2001-02-15 05:12:05 +00:00
Bryce McKinlay 2e22d9b885 DirectRasterGraphics.java (clone): Hoist to public.
* gnu/awt/j2d/DirectRasterGraphics.java (clone): Hoist to public.
	* gnu/awt/j2d/IntegerGraphicsState.java (setClip): Call
	Rectangle.clone(), not Object.clone().

From-SVN: r39706
2001-02-15 04:36:34 +00:00
Bryce McKinlay 505ce70d3f TreeSet.java (clone): Call TreeMap.clone(), not Object.clone().
* 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-15 03:59:57 +00:00
Bryce McKinlay 97a4d32ec6 natClass.cc (getSignature): Don't try to dereference param_types if it is null.
* 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-14 05:32:31 +00:00
Bryce McKinlay a142a99626 re PR libgcj/1758 (java.util package lacks TreeMap)
* 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-14 04:44:21 +00:00
Tom Tromey f3b43865ac PipedReader.java (ready): Throw IOException if pipe closed.
* java/io/PipedReader.java (ready): Throw IOException if pipe
	closed.
	* java/io/FilterReader.java (close): Don't clear `in'.
	* java/io/CharArrayReader.java (mark): Throw IOException if stream
	closed.
	(read, ready, reset, skip): Added exception message.
	* java/io/BufferedReader.java (mark, reset, ready, read, skip):
	Perform checkStatus check inside synchronized block.

From-SVN: r39641
2001-02-13 18:55:13 +00:00
Tom Tromey 967eb03e12 * gnu/awt/j2d/AbstractGraphicsState.java (clone): Made public.
From-SVN: r39640
2001-02-13 18:48:46 +00:00
Tom Tromey 1eba9d1f8f re PR libgcj/1351 (_Jv_select -vs- Thread.interrupt)
Fix for PR libgcj/1351:
	* posix.cc (_Jv_select): Throw InterruptedIOException if thread is
	interrupted.
	Include Thread.h and InterruptedIOException.h.

From-SVN: r39639
2001-02-13 18:44:51 +00:00
Bryce McKinlay 7eecbdb322 BlockDataException.java: Removed.
* java/io/BlockDataException.java: Removed.
	* java/io/ObjectInputStream.java (readObject): Throw
	StreamCorruptedException, not BlockDataException.
	* Makefile.am: Remove BlockDataException.
	* Makefile.in: Rebuild.

From-SVN: r39616
2001-02-13 07:42:48 +00:00
Jeff Sturm c6b33a47ea interpret.cc (continue1): [insn_invokevirtual] Do an explicit null pointer check.
2001-02-12  Jeff Sturm  <jeff.sturm@commerceone.com>
            Tom Tromey  <tromey@redhat.com>

	* interpret.cc (continue1): [insn_invokevirtual] Do an explicit
	null pointer check.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r39607
2001-02-12 17:30:00 +00:00
Tom Tromey 932670198f * java/util/Timer.java: New version from Classpath.
From-SVN: r39573
2001-02-09 23:28:55 +00:00
Bryce McKinlay 0e206b71aa Double.java (doubleToRawLongBits): Now native.
* java/lang/Double.java (doubleToRawLongBits): Now native.
	* java/lang/Float.java (floatToRawIntBits): Likewise.
	* java/lang/natDouble.cc (doubleToRawLongBits): New method.
	* java/lang/natFloat.cc (floatToRawIntBits): Likewise.

From-SVN: r39572
2001-02-09 22:13:33 +00:00
Alexandre Petit-Bianco 010cc79a7e File.java (java.net): Imported.
2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* java/io/File.java (java.net): Imported.
	(getAbsoluteFile): Added.
	(getCanonicalPath): Likewise.
	(toURL): Likewise.

(http://gcc.gnu.org/ml/java-patches/2001-q1/msg00208.html)

From-SVN: r39562
2001-02-09 00:30:31 -08:00
Bryce McKinlay c2dd346b48 OutputStreamWriter.java: (flush, writeChars): Throw IOException if stream closed.
* java/io/OutputStreamWriter.java: (flush, writeChars): Throw
	IOException if stream closed.

From-SVN: r39559
2001-02-09 04:01:59 +00:00
Bryce McKinlay c97036e4c3 Byte.java: Remove redundant instanceof and null checks.
* java/lang/Byte.java: Remove redundant instanceof and null checks.
	* java/lang/Integer.java: Likewise.
	* java/lang/Long.java: Likewise.
	* java/lang/Short.java: Likewise.
	* java/lang/Double.java: Likewise.
	(doubleToRawLongBits): New method.
	* java/lang/Float.java: As above.
	(floatToRawIntBits): New method.

From-SVN: r39556
2001-02-09 02:56:38 +00:00
Tom Tromey 1c8b24ad46 * java/lang/Float.java (parseFloat): New method.
From-SVN: r39555
2001-02-09 02:21:27 +00:00
Tom Tromey 8a5f950e04 re PR libgcj/1913 (reading closed streams throws NullPointerException, not IOException)
From paul@dawa.demon.co.uk.  Fix for PR libgcj/1913:
	* java/io/InputStreamReader.java (ready, read): Throw IOException
	if stream has been closed.

From-SVN: r39553
2001-02-09 01:54:38 +00:00
Warren Levy 1ae696e59a mauve.exp: Added support for XFAILs.
* libjava.mauve/mauve.exp: Added support for XFAILs.
	* libjava.mauve/xfails: New file.

From-SVN: r39536
2001-02-08 12:04:57 +00:00
Joseph Myers 7e5fd99fd3 gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
gcc/java/:
	* gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.

libffi/:
	* include/ffi.h.in: Change sourceware.cygnus.com references to
	gcc.gnu.org.

libjava/:
	* README, gij.cc, java/lang/natClass.cc, java/lang/natSystem.cc:
	Change sources.redhat.com and sourceware.cygnus.com references to
	gcc.gnu.org.

From-SVN: r39531
2001-02-08 01:49:53 +00:00
Tom Tromey a4c6d37356 re PR libgcj/1906 (difference between gcj and jdk for MessageFormat)
Fix for PR libgcj/1906:
	* java/text/MessageFormat.java (setLocale): Use named class
	literals.
	(forName): Removed.
	(format(Object,StringBuffer,FieldPosition)): Special case if
	argument is an Object[].

From-SVN: r39529
2001-02-07 22:46:28 +00:00
Bryce McKinlay b3eda2ff9c re PR java/1895 (Libjava: Arrays.sort doesn't work)
* 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-02-07 09:32:46 +00:00
Jeff Sturm c5f9277c56 configure.host: Use sjlj-exceptions for Alpha.
2000-02-03  Jeff Sturm  <jeff.sturm@commerceone.com>

	* configure.host: Use sjlj-exceptions for Alpha.

From-SVN: r39450
2001-02-05 05:49:44 +00:00
Bryce McKinlay ca5b1ff89a Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list of macros used when compiling jvspec.c.
gcc/java:
        * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
        of macros used when compiling jvspec.c.
        * jvspec.c (lang_specific_driver): Link with the shared
        libgcc by default.

libjava:
        * libgcj.spec.in: Don't force static libgcc into the executable.
        * configure.in (FORCELIBGCCSPEC): Removed.

From-SVN: r39449
2001-02-05 05:46:16 +00:00
Tom Tromey 4673dd2cc1 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (LTCXXCOMPILE): New macro.

From-SVN: r39379
2001-01-31 17:12:25 +00:00
Andrew Haley cab1f90abf 2001-01-26 Andrew Haley <aph@redhat.com>
(INIT_FPE): Use a direct system call to set the handler.

From-SVN: r39354
2001-01-30 21:00:22 +00:00
Richard Henderson 0be25992bc configure.in (target_makefile_frag): Use mt-alphaieee.
* configure.in (target_makefile_frag) [alpha*-*]: Use mt-alphaieee.

 	* mt-alphaieee: New file.

 	* config/alpha/t-ieee: Remove multilibbing.
 	(TARGET_LIBGCC2_CFLAGS): Add -mieee.

 	* configure.host (alpha*-*) [libgcj_flags]: Add -mieee.

From-SVN: r39309
2001-01-27 22:59:00 -08:00
Tom Tromey 65422ec58b jni.cc (_Jv_JNIFunctions): Added comment for each entry in native interface structure.
* jni.cc (_Jv_JNIFunctions): Added comment for each entry in
	native interface structure.

From-SVN: r39298
2001-01-27 19:30:31 +00:00
Bryce McKinlay 60b7365f52 ObjectInputStream.java (read): AND byte with 0xff to make result unsigned.
* java/io/ObjectInputStream.java (read): AND byte with 0xff to make
	result unsigned.
	(read (byte[], int, int)): Only call readNextBlock() if the block
	buffer would actually be overrun. Increment blockDataPosition.
	(callReadMethod): Propagate exceptions from invocation target.
	* java/io/ObjectOutputStream.java (callWriteMethod): Propagate
	exceptions from invocation target.

From-SVN: r39293
2001-01-27 06:04:29 +00:00
Tom Tromey f86f42a8ff jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from external to internal representation.
* jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from external
	to internal representation.
	(_Jv_JNI_GetAnyFieldID): Likewise.  Also, only use
	_Jv_FindClassFromSignature.

From-SVN: r39289
2001-01-26 23:00:19 +00:00
Tom Tromey 80a59404aa * libjava.jni/martin.c (Java_martin_myNative): Flush stdout.
From-SVN: r39287
2001-01-26 22:52:19 +00:00
Tom Tromey d0815622ea martin.out: New file.
* libjava.jni/martin.out: New file.
	* libjava.jni/martin.c: New file.
	* libjava.jni/martin.java: New file.

From-SVN: r39286
2001-01-26 22:41:41 +00:00
Warren Levy 5bb1db008c natSystem.cc (getSystemTimeZone): Only use tm_gmtoff and timezone if they are available on the system.
* java/lang/natSystem.cc (getSystemTimeZone): Only use tm_gmtoff
	and timezone if they are available on the system.

From-SVN: r39283
2001-01-26 21:57:08 +00:00
Tom Tromey f07f528411 * java/lang/sf_fabs.c: Use uint32_t, not __uint32_t.
From-SVN: r39269
2001-01-25 19:07:18 +00:00
Tom Tromey 295504e3a7 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (c_source_files): Added sf_fabs.c.
	* java/lang/sf_fabs.c: New file.

From-SVN: r39238
2001-01-24 17:43:25 +00:00
Warren Levy 1aa605c814 SimpleDateFormat.java (format): Compute hour for cases HOUR_OF_DAY1_FIELD (1-24)...
* java/text/SimpleDateFormat.java (format): Compute hour for cases
	HOUR_OF_DAY1_FIELD (1-24), HOUR1_FIELD (1-12), and HOUR0_FIELD (0-11)
	correctly.  Adjust properly from 0-23 clock hour.

Fixes failure in Mauve test java.text.SimpleDateFormat.Test (format).

From-SVN: r39147
2001-01-20 00:37:09 +00:00
Mark Wielaard d150822e55 * java/bean/Beans.java (instantiate): enable Applet code from Classpath
From-SVN: r39105
2001-01-18 00:43:17 +00:00
Bryce McKinlay 607adf67a0 Class.h (isInterface): Move implementation from natClass.cc.
* java/lang/Class.h (isInterface): Move implementation from
	natClass.cc. Declare inline.
	(Class): Add default constructor.
	* java/lang/Object.h: Update comments.
	* java/lang/natClass.cc (initializeClass): Use _Jv_InitClass to
	initialize superclass, saving a call if super is already initialized.

From-SVN: r39091
2001-01-17 10:22:33 +00:00
Alexandre Petit-Bianco ed8cc5fdf8 prims.cc (init_prim_class): Deleted.
2001-01-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* prims.cc (init_prim_class): Deleted.
	(DECLARE_PRIM_TYPE): Rewritten.
	* java/lang/Class.h (stdio.h): Include removed.
	(stddef.h): Included.
	(java/lang/reflect/Modifier.h): Likewise.
	(Class): Contructor now takes arguments, initializes fields.
	(initializePrim): Prototype deleted.
	* java/lang/natClass.cc (initializePrim): Deleted.

(http://sources.redhat.com/ml/java-patches/2001-q1/msg00081.html)

From-SVN: r39088
2001-01-17 00:13:06 -08:00
Richard Henderson c99a2d3137 libjava.exp (bytecompile_file): Don't unset CLASSPATH.
* lib/libjava.exp (bytecompile_file): Don't unset CLASSPATH.
        (libjava_arguments): Use .jar extension for libgcj.

From-SVN: r39085
2001-01-16 22:45:40 -08:00
Warren Levy 19c976393d * java/math/BigInteger.java: Update Copyright year.
From-SVN: r39082
2001-01-17 04:13:17 +00:00
Hans Boehm c7fb0b9218 BigInteger.java (setShiftRight): Only do negative shift if count != 0.
2001-01-16  Hans Boehm  <hans_boehm@hp.com>

	* java/math/BigInteger.java (setShiftRight): Only do negative shift
	if count != 0.

From-SVN: r39080
2001-01-17 01:00:53 +00:00
Alexandre Petit-Bianco 2feccc205e All files with updated copyright.
2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	All files with updated copyright.
	* prims.cc (class _Jv_PrimClass): Removed.
	(init_prim_class): New function.
	(DECLARE_PRIM_TYPE): Rewritten. `java::lang::Class' replaces
	`_Jv_PrimClass' in primitive type declarations. Assign to the
	value returned by `init_prim_class.'
	* gcj/array.h: `java::lang::Class' replaces `_Jv_PrimClass' in
	primitive type declarations.
	(JvPrimClass): Cast to `jclass' removed.
	* java/lang/Class.h (Class): New constructor.
	(Class): New copy constructor.
	(initializePrim): New prototype.
	(_Jv_PrimClass): Field removed.
	* java/lang/Object.h (struct _JvObjectPrefix): New virtuals
	nacd_1 and nacd_2 (for compatibility with the new C++ ABI.)
	(class java::lang::Object): `finalize' moved up front.
	* java/lang/natClass.cc
	(isAssignableFrom): Turned outline.
	(isInstance): Likewise.
	(isInterface): Likewise, fixed indentation.
	(initializePrim): New function.

(New C++ ABI compatibility patch:
 http://sources.redhat.com/ml/java-patches/2001-q1/msg00065.html)

From-SVN: r39032
2001-01-15 00:11:40 -08:00
Mark Wielaard b9333bff58 URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com)
* java/net/URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com)
   (decode): Merge comments with Classpath, don't throw Exception

From-SVN: r39030
2001-01-15 07:58:16 +00:00
Tom Tromey 706c0c1156 Removed bogus ChangeLog entry
From-SVN: r38969
2001-01-13 00:03:28 +00:00
Tom Tromey fafc249b1b natGtkComponentPeer.cc (getLocationOnScreen): Wrote.
* gnu/awt/gtk/natGtkComponentPeer.cc (getLocationOnScreen):
	Wrote.
	(setCursor): Wrote.
	Include Cursor.h.
	* gnu/awt/gtk/natGtkLabelPeer.cc: New file.
	* gnu/awt/gtk/natGtkButtonPeer.cc: New file.
	* gnu/awt/gtk/gtkcommon.h (class _Jv_GdkThreadLock): New class.
	* gnu/awt/gtk/GtkLabelPeer.java: New file.
	* gnu/awt/gtk/GtkButtonPeer.java: New file.

From-SVN: r38967
2001-01-12 23:08:23 +00:00
Tom Tromey b755792e3c natSystem.cc: Include locale.h if it exists.
* java/lang/natSystem.cc: Include locale.h if it exists.
	* configure: Rebuilt.
	* configure.in: Check for locale.h.

From-SVN: r38957
2001-01-12 19:16:05 +00:00
Tom Tromey c1ef066249 Cursor.java (Cursor(String)): Set type to custom.
* java/awt/Cursor.java (Cursor(String)): Set type to custom.
	(Cursor(int), getPredefinedCursor): Throw exception if argument
	invalid.

From-SVN: r38911
2001-01-11 17:49:47 +00:00
Bryce McKinlay f6d1c49e80 Makefile.am: Re-enable dependencies.
* Makefile.am: Re-enable dependencies.
	* Makefile.in: Rebuilt.

From-SVN: r38890
2001-01-11 02:50:47 +00:00
Warren Levy 737c87df28 * java/math/BigDecimal.java (divide): Fixed comment.
From-SVN: r38862
2001-01-10 10:26:34 +00:00
Warren Levy 698489049d re PR libgcj/1596 (setScale() missing from java.math.BigDecimal)
Fix for PR libgcj/1596:
	* java/math/BigDecimal.java (divide): Check newScale for validity.
	Ensure that BigInteger.pow() is called with a non-negative value.
	(setScale (int)): New public method.
	(setScale (int,int)): New public method.

From-SVN: r38861
2001-01-10 09:38:08 +00:00
Oskar Liljeblad 10a855c7f4 re PR libgcj/1338 (StreamTokenizer does not handle /* comments correctly)
2001-01-09  Oskar Liljeblad <osk@hem.passagen.se>

	Fix for PR libgcj/1338:
	* java/io/StreamTokenizer.java (nextToken): Handle // and /* before
	commentChar.  Fixed typos in comments.

From-SVN: r38830
2001-01-09 11:21:12 +00:00
Warren Levy 3824a48600 re PR libgcj/1411 (natTimeZone.cc should be removed)
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
2001-01-09 07:07:51 +00:00
Bryce McKinlay 5bb11b2e20 In gcc/java:
* class.c (make_class_data): Push initial value for "arrayclass".
	* decl.c (init_decl_processing): Add new class field "arrayclass".

In libjava:
	* java/lang/Class.h (_Jv_InitClass): Use __builtin_expect.
	(_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass.
	(_Jv_GetArrayClass): New inline function.
	(arrayclass): New field.
	* prims.cc (_Jv_NewObjectArray): Use _Jv_GetArrayClass. Don't use
	_Jv_GetArrayElementFromElementType.
	(_Jv_NewPrimArray): Ditto.
	(_Jv_PrimClass constructor): Initialize "depth", "ancestors", and
	"idt" for completeness. Initialze "arrayclass" using _Jv_NewArrayClass.
	Set Modifier::ABSTRACT.
	* java/lang/natClassLoader.cc (_Jv_NewClass): Initialize "arrayclass".
	(_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass. Now void.
	Now synchronized. Array classes are now referenced from
	elementClass->arrayclass. Don't use _Jv_FindClassInCache.
	Set array classes' accessibility flags correctly. Optimize so that
	all array classes share the same IDT.
	* java/lang/reflect/natArray.cc (newInstance): Use _Jv_GetArrayClass.
	* java/lang/reflect/natMethod.cc (_Jv_GetTypesFromSignature): Ditto.
	* java/lang/natClass.cc (_getFields): Increment offset. Prevent fields
	in superclasses from overwriting classes own fields.
	(_Jv_IsAssignableFrom): Check for NULL source idt instead of calling
	Modifier::isAbstract().
	(null_idt): New static field.
	(_Jv_PrepareConstantTimeTables): Optimize case where class implements
	no interfaces.
	(_Jv_IndexOf): Made inline.
	* boehm.cc (_Jv_MarkObj): Mark "arrayclass" field.

From-SVN: r38808
2001-01-08 23:28:56 +00:00
Tom Tromey 5bab9296f5 re PR java/1586 (linux build problem for libjava - cpplib (?))
Fix for PR java/1586:
	* Makefile.in: Rebuilt.
	* Makefile.am (AUTOMAKE_OPTIONS): Added no-dependencies.

From-SVN: r38807
2001-01-08 22:55:15 +00:00
Bryce McKinlay 0a8f3dbb7a Makefile.am: Use the new "-M -MF" option for generating dependencies from the c++ compiler.
* Makefile.am: Use the new "-M -MF" option for generating dependencies
	from the c++ compiler.
	* Makefile.in: Rebuilt.

From-SVN: r38794
2001-01-08 07:55:25 +00:00
Bryce McKinlay 4fd297757d * libjava.compile/SuperConstr.java: New test case.
From-SVN: r38793
2001-01-08 02:13:32 +00:00
Anthony Green 6a9d31a7d4 001-01-07 Anthony Green <green@redhat.com>
* Makefile.am (texinfo): Add texinfo target for generating texinfo
        documentation.
	* Makefile.in: Rebuilt.

	* scripts/TexinfoDoclet.java: New file.

	* doc/java-applet.texi, doc/java-lang-reflect.texi,
	doc/java-awt-color.texi, doc/java-lang.texi,
	doc/java-awt-datatransfer.texi, doc/java-math.texi,
        doc/java-awt-event.texi, doc/java-net.texi,
	doc/java-awt-geom.texi, doc/java-security-spec.texi,
	doc/java-awt-image.texi, doc/java-security.texi,
	doc/java-awt-peer.texi, doc/java-sql.texi, doc/java-awt.texi,
	doc/java-text.texi, doc/java-beans-beancontext.texi,
        doc/java-util-jar.texi, doc/java-beans.texi,
	doc/java-util-zip.texi, doc/java-io.texi, doc/java-util.texi,
	doc/java-lang-ref.texi: New files.

From-SVN: r38789
2001-01-08 00:27:51 +00:00
Anthony Green bc6d273e64 Fix bug in URLConnection and correct javadoc annotations in StringBuffer.
From-SVN: r38781
2001-01-07 20:01:46 +00:00
Anthony Green 0e2e89fd2e Fix comments for doclets
From-SVN: r38754
2001-01-06 23:28:40 +00:00
Bryce McKinlay a7fabf19be * java/io/PipedReader: Synchronize on "lock" instead of this.
From-SVN: r38731
2001-01-05 23:30:50 +00:00
Bryce McKinlay 865b4ea73f PipedInputStream: Rewrote to be simpler and more correct.
* java/io/PipedInputStream: Rewrote to be simpler and more correct.
	* java/io/PipedOutputStream: Updated to match new PipedInputStream.
	* java/io/PipedReader: New implementation based on new
	PipedInputStream.
	* java/io/PipedWriter: Updated to match new PipedOutputStream.

From-SVN: r38708
2001-01-05 08:23:51 +00:00
Bryce McKinlay 7ae30a9196 * java/lang/Thread.java: Update comment.
From-SVN: r38697
2001-01-05 00:31:45 +00:00
Tom Tromey 234fb86cae ScrollPane.java (setBlockIncrement): Throw error.
* java/awt/ScrollPane.java (setBlockIncrement): Throw error.
	(getViewportSize): Insets include scrollbar size.
	(doLayout): Finished.
	(getScrollPosition): Wrote.
	* java/awt/peer/ScrollPanePeer.java (setBlockIncrement): Removed.

From-SVN: r38670
2001-01-03 20:34:44 +00:00
Tom Tromey f5826791be ScrollPane.java: Wrote.
* java/awt/ScrollPane.java: Wrote.
	* java/awt/peer/ScrollPanePeer.java (setBlockIncrement): New
	method.

	* java/awt/Panel.java (Panel()): Fixed.

	* java/awt/Component.java (isShowing): Return false if no peer
	exists, and true if component is visible and no parent exists.
	(getLocationOnScreen): Wrote.
	(getPreferredSize): Removed FIXME comment.
	(getMinimumSize): Likewise.
	(getAlignmentX, getAlignmentY): Wrote.
	(list): Wrote.
	(requestFocus): Wrote.
	(transferFocus): Wrote.
	(findNextFocusComponent): New method.
	(hasFocus()): Wrote.
	(checkImage): Wrote.
	(enableEvents): Call setEventMask on the peer.

	* java/awt/Container.java (list): Use super.list() to print self.
	(findNextFocusComponent): New method.
	(setLayout): Call invalidate.
	(findComponentAt): Wrote.

From-SVN: r38639
2001-01-03 00:07:13 +00:00
Bryce McKinlay 2e9ab75de4 Forgot these in last commit.
From-SVN: r38558
2000-12-30 12:22:15 +00:00
Bryce McKinlay e301621d19 For boehm-gc:
* configure.in: Rename THREADLIB to THREADLIBS.
	* Makefile.am (LINK): Add $(THREADLIBS) to libtool command line. This
	ensures that we link the correct version of the linuxthreads semaphore
	functions.
	* Makefile.in: Rebuilt.
	* configure: Rebuilt.

	* linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the
	list of signals which are not blocked during suspend in the NO_SIGNALS
	case.

For libjava:
	* Makefile.am (libgcj_la_LIBADD): Add $(THREADLIBS). This ensures that
	the correct versions of various linuxthreads functions get linked.
	* Makefile.in: Rebuilt.
	* java/lang/natThread.cc (finalize_native): New static function. Call
	_Jv_ThreadDestroyData.
	(initialize_native): Register finalizer for "data".
	* include/posix-threads.h (_Jv_ThreadInitData): New simpler prototype.
	(_Jv_ThreadDestroyData): New prototype.
	* include/win32-threads.h: Ditto.
	* include/no-threads.h: Ditto.
	* posix-threads.cc (_Jv_ThreadInitData): Implement new prototype.
	(_Jv_ThreadDestroyData): New function. Free native thread "data" and
	move mutex and condition variable destroy code from:
	(really_start): ...here.
	(_Jv_ThreadStart): Set PTHREAD_CREATE_DETACHED.
	* win32-threads.cc (_Jv_ThreadInitData): Implement new prototype.
	(_Jv_ThreadDestroyData): Implemented.
	* nogc.cc (_Jv_AllocObject): Use "void *" not "ptr_t".
	(_Jv_AllocArray): Ditto.

From-SVN: r38557
2000-12-30 12:18:39 +00:00
Jeff Sturm 4c58589f1a DriverManager.java (getConnection): Don't set user/password properties if null.
2000-12-27  Jeff Sturm  <jeff.sturm@commerceone.com>

	* java/sql/DriverManager.java (getConnection): Don't set
	user/password properties if null.

From-SVN: r38516
2000-12-28 22:21:36 +00:00
Warren Levy ed55bdc47f re PR libgcj/1358 (java.util.Date.toString() doesn't seem to behave properly.)
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-28 05:55:56 +00:00
Bryce McKinlay 6147e9d0c9 re PR libgcj/1516 (Method.invoke won't accept boolean parameters)
Fix for PR libgcj/1516:
	* java/lang/reflect/natMethod.cc (primitives): Remove void entry.
	Add boolean entry.
	(can_widen): Declared inline. Remove redundant checks for void
	arguments and char->short conversion. Add special case for boolean
	conversions.
	(ffi_type): Declared inline.
	(_Jv_CallAnyMethodA): Move unwrapping logic inside isPrimitive() block.

From-SVN: r38506
2000-12-28 04:34:33 +00:00
Bryce McKinlay 867e24ad3d natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can not be assigned to Object.
* java/lang/natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can
	not be assigned to Object.

From-SVN: r38505
2000-12-28 04:33:53 +00:00
Petter Reinholdtsen c4f58426c1 SQLWarning.java: Fixed typo in comment.
2000-12-26  Petter Reinholdtsen  <pere@hungry.com>

	* java/sql/SQLWarning.java: Fixed typo in comment.

From-SVN: r38493
2000-12-27 01:58:23 +00:00
Tom Tromey b3b90f82f4 MenuItem.java (paramString): Now protected.
* java/awt/MenuItem.java (paramString): Now protected.

	* java/awt/MenuShortcut.java: Implements Serializable.

	* java/awt/MenuBar.java: Rewrote from scratch.

	* java/awt/MenuComponent.java (removeNotify): Wrote.
	Implements Serializable.

	* java/awt/GridBagConstraints.java (GridBagConstraints): New
	constructor.

	* java/awt/CheckboxMenuItem.java: Wrote.

From-SVN: r38488
2000-12-26 07:18:16 +00:00
Tom Tromey 5472d1951a MenuContainer.java: Fixed typo.
* java/awt/MenuContainer.java: Fixed typo.

	* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added SystemColor.java.
	* java/awt/SystemColor.java: New file.

	* java/awt/Color.java (rgba): Now package-private.

	* java/awt/event/InputEvent.java (isAltGraphDown): New method.

	* java/awt/event/ContainerEvent.java (getContainer): Renamed from
	getComponent.

	* java/awt/MenuItem.java (addNotify): New method.
	(MenuItem(String,MenuShortcut)): New constructor.
	(setLabel): Notify peer of change.
	(setEnabled): Likewise.

	* java/awt/GridLayout.java (toString): New method.

	* java/awt/FlowLayout.java (LEADING, TRAILING): New constants.
	(FlowLayout): Check for LEADING and TRAILING.
	(setAlignment): Likewise.
	(layoutContainer): Handle component orientation.

	* java/awt/Component.java (orientatin): New field.
	(setComponentOrientation): Wrote.
	(getComponentOrientation): Wrote.

	* java/awt/Event.java (Event): Implements Serializable.
	(consumed): New field for serialization.
	* java/awt/Dimension.java (Dimension): Implements Serializable.
	* java/awt/Cursor.java (Cursor): Implements Serializable.
	* java/awt/Container.java (Container): No longer abstract.

	* java/awt/Choice.java: Wrote.
	* java/awt/Checkbox.java: Wrote.
	* java/awt/ItemSelectable.java: Documented.
	* java/awt/CheckboxGroup.java: Wrote.

	* java/awt/CardLayout.java (layoutContainer): Directly use fields
	in other classes.
	(getSize): Likewise.

From-SVN: r38486
2000-12-26 00:25:13 +00:00
Jeff Sturm 83050e0d93 FileDescriptor.java: Initialize fd to -1.
2000-12-24  Jeff Sturm  <jeff.sturm@commerceone.com>

	* java/io/FileDescriptor.java: Initialize fd to -1.
	Remove default constructor.

From-SVN: r38485
2000-12-26 00:24:01 +00:00
Joseph Myers 93b0dee779 * java/lang/mprec.h: Change C9X reference to refer to C99.
From-SVN: r38481
2000-12-23 23:38:51 +00:00
Bryce McKinlay 86a42a5f24 Throwable.java (trace_enabled): New static field.
* java/lang/Throwable.java (trace_enabled): New static field.
	* java/lang/natThrowable.cc (fillInStackTrace): Do nothing if
	trace_enabled not set.
	* prims.cc (main_init): Turn off trace_enabled while creating
	default exception objects.

From-SVN: r38442
2000-12-22 06:19:24 +00:00
Tom Tromey 5ebee7d409 PropertyChangeListener.java: Extends EventListener.
* java/beans/PropertyChangeListener.java: Extends EventListener.
	* java/beans/VetoableChangeListener.java: Extends EventListener.

From-SVN: r38421
2000-12-21 18:39:43 +00:00
Tom Tromey 465c091ce9 * java/util/zip/Deflater.java (update, init): Now private.
From-SVN: r38420
2000-12-21 18:39:19 +00:00
Bryce McKinlay f387d86265 BasicMapEntry.java: Re-added.
* 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-21 02:00:15 +00:00
Warren Levy 1889cf4a71 GregorianCalendar.java (GregorianCalendar): Constructors need to set 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-19 07:48:54 +00:00
Tom Tromey e2ef2bf880 mauve.exp (test_mauve): Don't look for exceptions thrown in the test harness.
* libjava.mauve/mauve.exp (test_mauve): Don't look for exceptions
	thrown in the test harness.
	(test_mauve_sim): Likewise.

From-SVN: r38368
2000-12-18 23:13:05 +00:00
Bryce McKinlay be36b6d0dd Removed additional addNotify() peer hacks.
From-SVN: r38367
2000-12-18 22:17:25 +00:00
Bryce McKinlay da68e69359 Window.java (addNotify): Remove peer casting hack now that gcj/312 is fixed.
* java/awt/Window.java (addNotify): Remove peer casting hack now
	that gcj/312 is fixed.

From-SVN: r38364
2000-12-18 21:20:31 +00:00
Joseph Myers 161e6a4258 COPYING: Update to current ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes...
* COPYING: Update to current
	ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references
	to 19yy as example year in copyright notice).

From-SVN: r38340
2000-12-18 09:12:19 +00:00
Bryce McKinlay dbb04e883d natInflater.cc (inflate): Treat Z_BUF_ERROR as end-of-stream if avail_in is 0.
* java/util/zip/natInflater.cc (inflate): Treat Z_BUF_ERROR as
        end-of-stream if avail_in is 0.

From-SVN: r38338
2000-12-18 01:00:23 +00:00
Bryce McKinlay 8e0fe03e8e ArrayList.java (data): Declare transient.
* java/util/ArrayList.java (data): Declare transient.
	(serialPersistantFields): Removed.
	(readObject): Use defaultReadObject(), not readFields().
	(writeObject): Use defaultWriteObject(), not writeFields().

From-SVN: r38328
2000-12-17 11:51:14 +00:00
Jeff Sturm 4984a8d3e5 Hashtable.java (put): Remove `last' variable.
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
2000-12-17 09:15:51 +00:00
Tom Tromey 68c7dea8ed libjava.exp (test_libjava_from_javac): Strange quoting trick for `.class' link case.
* lib/libjava.exp (test_libjava_from_javac): Strange quoting trick
	for `.class' link case.
	(bytecompile_file): Change directory outside of `catch'.

	* libjava.lang/Thread_1.java: Removed.
	* libjava.lang/Thread_1.out: Likewise.

	* libjava.lang/N19990310_4.xfail: New file.
	* libjava.lang/stub.xfail: Added new failure modes.
	* libjava.lang/stringconst.xfail: New file.
	* libjava.lang/PR162.xfail: New file.
	* libjava.lang/Final.xfail: Removed.

From-SVN: r38311
2000-12-16 19:02:54 +00:00
Tom Tromey 3cd4948faf * libjava.lang/instinit.out: Removed erroneous line.
From-SVN: r38299
2000-12-16 06:45:22 +00:00
Tom Tromey fabd67f907 * libjava.lang/Thread_1.out: Expect `0' active count.
From-SVN: r38298
2000-12-16 06:41:04 +00:00
Tom Tromey 3a9e1959df stub.xfail: New file.
* libjava.lang/stub.xfail: New file.
	* libjava.lang/pr83.xfail: New file.
	* libjava.lang/err8.xfail: New file.
	* libjava.lang/err7.xfail: New file.
	* libjava.lang/Shazam.xfail: New file.
	* libjava.lang/err11.xfail: New file.

	* libjava.lang/instinit2.java: Renamed class to `instinit2'.

	* libjava.lang/anon3.out: Fixed typo.

	* libjava.lang/Class_1.java (main): Uncommented out previously
	failing code; now it works

From-SVN: r38297
2000-12-16 05:59:45 +00:00
Tom Tromey 0254608834 libjava.compile test fixes.
* lib/libjava.exp (libjava_tcompile): New proc.
	(test_libjava_from_source): Use it.
	(test_libjava_from_javac): Likewise.
	(find_javac): New proc.
	(bytecompile_file): Use it.
	(test_libjava_from_javac): Handle `xfail-gcjC' tag.  If no-exec
	set, then don't link even if program has a `main'.

	* libjava.compile/static_3.xfail: New file.
	* libjava.compile/weirddecl.xfail: New file.
	* libjava.compile/static_2.xfail: New file.
	* libjava.compile/not_a_redef.xfail: New file.
	* libjava.compile/inner_1.xfail: New file.
	* libjava.compile/assignment_2.xfail: New file.
	* libjava.compile/assignment.xfail: New file.
	* libjava.compile/abstr.xfail: New file.
	* libjava.compile/PR375.xfail: New file.
	* libjava.compile/PR374.java: New file.
	* libjava.compile/PR238.xfail: New file.
	* libjava.compile/PR208.xfail: New file.
	* libjava.compile/PR207.xfail: New file.

From-SVN: r38296
2000-12-16 02:06:29 +00:00
Tom Tromey 1e185c02d4 ResourceBundle.java (trySomeGetBundle): Pass class loader to Class.forName.
* java/util/ResourceBundle.java (trySomeGetBundle): Pass class
	loader to Class.forName.

From-SVN: r38289
2000-12-15 15:49:50 +00:00
Tom Tromey cd84842395 * java/util/ResourceBundle.java
(getBundle(String,Locale,ClassLoader)): New method.
	(trySomeGetBundle): Added `loader' argument.
	(partialGetBundle): Likewise.

From-SVN: r38275
2000-12-15 06:51:07 +00:00
Tom Tromey 13b7bc8a56 NumberFormat.java (groupingUsed, [...]): Now package-private.
* java/text/NumberFormat.java (groupingUsed, parseIntegerOnly,
	maximumFractionDigits, maximumIntegerDigits,
	minimumFractionDigits, minimumIntegerDigits): Now
	package-private.

From-SVN: r38274
2000-12-15 06:23:28 +00:00
Tom Tromey 8eb1306fb7 * java/lang/Thread.java (checkAccess): Now final.
From-SVN: r38273
2000-12-15 06:15:49 +00:00
Tom Tromey 4ca70ccd2a * java/lang/RuntimePermission.java: Class now final.
From-SVN: r38272
2000-12-15 06:13:35 +00:00
Tom Tromey 49c24f00aa * java/io/StringWriter.java (StringWriter(int)): Now public.
From-SVN: r38271
2000-12-15 06:08:55 +00:00
Tom Tromey f2edab0e90 * java/io/SerializablePermission.java (legal_names): Now private.
From-SVN: r38270
2000-12-15 05:59:31 +00:00
Tom Tromey 9acffced80 Character.java: Updated UnicodeBlock constants.
* java/lang/Character.java: Updated UnicodeBlock constants.
	* scripts/blocks.pl: Special case private use and surrogate
	areas.  Updated URL.

From-SVN: r38269
2000-12-15 05:53:39 +00:00
Tom Tromey ee84a135f5 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (GCJ_WITH_FLAGS): New macro, includes --encoding
	option.
	(GCJCOMPILE): Use it.
	(JAVAC): Likewise.

From-SVN: r38219
2000-12-13 15:45:29 +00:00
Tom Tromey d65b78c9a4 FirstThread.java (Kcert, [...]): New static final fields.
* gnu/gcj/runtime/FirstThread.java (Kcert, Kfile, Khttp, Kjar):
	New static final fields.

From-SVN: r38200
2000-12-12 00:32:02 +00:00
Tom Tromey 7896f1e43a re GNATS libgcj/378 (Problem with scripts/classes.pl)
* scripts/classes.pl (scan): Skip lines with leading `*'.
	Fix for PR libgcj/378.

From-SVN: r38198
2000-12-11 21:50:39 +00:00
Bryce McKinlay 34a2a47f15 * gcj/javaprims.h: Rebuilt CNI namespace declarations.
From-SVN: r38188
2000-12-11 07:50:52 +00:00
Bryce McKinlay c5afc1922c * java/util/Hashtable.java (Enumerator.nextElement): Initialize `e'.
From-SVN: r38185
2000-12-11 04:54:55 +00:00
Bryce McKinlay 0aa9764b5a configure.in: Remove check for -fuse-divide-subroutine.
* configure.in: Remove check for -fuse-divide-subroutine.
	* configure: Rebuilt.

From-SVN: r38184
2000-12-11 04:37:14 +00:00
Bryce McKinlay 488d42af6f Makefile.am: Add HashSet.java and java/lang/ref classes.
* 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
2000-12-11 03:47:48 +00:00
Richard Henderson 48a9aced0c Recognize alpha*-*.
From-SVN: r38181
2000-12-11 02:30:14 +00:00
Anthony Green bc38c78775 Enable interpreter for alpha.
From-SVN: r38168
2000-12-10 07:12:32 +00:00
Alexandre Petit-Bianco f34ff6d61e Top level ChangeLog:
2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* libjava: Imported from /cvs/java.
	* libffi: Likewise.
	* Boehm-gc: Likewise.

libjava/ChangeLog:

2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* Makefile.am (data_DATA): libgcj.jar replaces libgcj.zip.
	(ZIP): Points at fastjar instead of zip.
	(libgcj_la_DEPENDENCIES): libgcj.jar replaces libgcj.zip.
	(libgcj_la_LDFLAGS): Correctly point at libsupc++.
	(libgcjx_la_DEPENDENCIES): libgcj.jar replaces libgcj.zip.
	(libgcjx_la_LDFLAGS): Correctly point at libsupc++.
	($(java_source_files:.java=.class):): libgcj.jar replaces libgcj.zip.
	($(x_java_source_files:.java=.class):): Likewise.
	(libgcj.jar:): Replaces libgcj.zip:, builds libgcj.jar and uses
	fastar's flags.
	(CLEANFILES): libgcj.jar replaces libgcj.zip.
	(java/lang/ClassLoader.h:): Depends on libgcj.jar.
	(gnu/gcj/runtime/FirstThread.h:, java/lang/Thread.h:,
	java/lang/String.h:, java/lang/reflect/Constructor.h:,
	java/lang/reflect/Field.h:, java/lang/reflect/Method.h:,
	gnu/gcj/runtime/VMClassLoader.h:,
	java/io/ObjectInputStream$$GetField.h:,
	java/io/ObjectOutputStream$$PutField.h:, header-check:): Likewise.
	(Makefile.in): Rebuilt.

gcc/java/ChangeLog:

2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
	jcf-path.c: Likewise.

From-SVN: r38167
2000-12-09 21:32:49 -08:00
Tom Tromey 583e347f78 From Phil Edwards:
* configure: Rebuilt.
	* configure.in: Use echo, not `:', to create .d files.

From-SVN: r38139
2000-12-08 22:27:09 +00:00
Warren Levy d5323b9905 StringBuffer.java (insert(int,char[])): Avoid NullPointerException so proper check of offset can be done.
* java/lang/StringBuffer.java (insert(int,char[])): Avoid
	NullPointerException so proper check of offset can be done.

From-SVN: r38132
2000-12-08 13:08:36 +00:00
Warren Levy be17b0fcff FileInputStream.java (close): Check if the fd is valid.
* java/io/FileInputStream.java (close): Check if the fd is valid.
	* java/io/RandomAccessFile.java (close): Ditto.
	* java/net/PlainDatagramSocketImpl.java (close): Ditto.
	* java/net/PlainSocketImpl.java (close): Ditto.

From-SVN: r38131
2000-12-08 10:28:32 +00:00
Tom Tromey b2d98afe06 GridBagConstraints.java: Filled in values for static final fields.
* java/awt/GridBagConstraints.java: Filled in values for static
	final fields.

From-SVN: r38081
2000-12-07 00:46:13 +00:00
Tom Tromey 308d7d2b3b * java/util/BitSet.java: Updated copyright notice.
From-SVN: r38078
2000-12-06 21:26:32 +00:00
Tom Tromey c9e99de581 Removed erroneous ChangeLog line
From-SVN: r38077
2000-12-06 21:23:00 +00:00
Tom Tromey ef9508c093 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new file.
	* java/awt/GridBagConstraints.java: New file.

From-SVN: r38076
2000-12-06 21:22:23 +00:00
Tom Tromey 456ffe4c68 Collator.java (decomposeCharacter, [...]): Now package-private, not protected.
* java/text/Collator.java (decomposeCharacter, decmp, strength):
	Now package-private, not protected.
	* java/text/DateFormatSymbols.java (equals): Now private.
	* java/text/DecimalFormatSymbols.java (safeGetChar): Now private.
	* java/util/BitSet.java: Class no longer final.
	* java/util/Set.java (toArray(Object[])): New method.

From-SVN: r38075
2000-12-06 21:14:14 +00:00
Warren Levy 9de488f698 TimeZone.java (getAvailableIDs): Activated commented out code dependent on compiler and library changes.
* java/util/TimeZone.java (getAvailableIDs): Activated commented
	out code dependent on compiler and library changes.

From-SVN: r37994
2000-12-04 10:24:38 +00:00
Warren Levy 21a160075e FilePermission.java: Made class final per spec.
* java/io/FilePermission.java: Made class final per spec.
	* java/text/DecimalFormatSymbols.java (setCurrencySymbol): Changed
	method name to match spec (fixed typo).
	* java/util/LinkedList.java: Implements List.

From-SVN: r37993
2000-12-04 10:20:00 +00:00
Bryce McKinlay 64fc0133eb natDouble.cc: Include fdlibm.h, not mprec.h.
* java/lang/natDouble.cc: Include fdlibm.h, not mprec.h. From
	Edgar Villanueva <edgarvil@home.com>.

From-SVN: r37991
2000-12-04 08:22:34 +00:00
Tom Tromey 2936419d1c Point2D.java: Added protected constructor.
* java/awt/geom/Point2D.java: Added protected constructor.
	(equals): New method.
	(Float.setLocation(float,float)): New method.
	* java/awt/geom/Dimension2D.java: Added protected constructor.
	* java/awt/geom/AffineTransform.java: Made all constants public.
	(concatenate): Fixed typo in name.
	* java/awt/event/WindowAdapter.java: Class now abstract.
	* java/awt/event/KeyEvent.java (CHAR_UNDEFINED): Now final.
	* java/awt/event/FocusEvent.java: Extend ComponentEvent, not
	AWTEvent.

From-SVN: r37988
2000-12-04 02:27:21 +00:00
Tom Tromey c06093a0a3 AWTError.java: Extend Error, not IllegalStateException.
* java/awt/AWTError.java: Extend Error, not
	IllegalStateException.

From-SVN: r37987
2000-12-04 01:54:34 +00:00
Tom Tromey f933fd9286 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new file.
	* java/awt/geom/RoundRectangle2D.java: New file.

From-SVN: r37980
2000-12-03 21:21:52 +00:00
Tom Tromey a048c5b550 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new file.
	* java/awt/FlowLayout.java: New file.

From-SVN: r37968
2000-12-03 08:28:35 +00:00
Tom Tromey 8538fd010e Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new file.
	* java/awt/GridLayout.java: New file.

From-SVN: r37967
2000-12-03 07:16:20 +00:00
Tom Tromey 673953d6a5 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added new files.
	* java/awt/CardLayout.java: New file.
	* java/awt/AWTPermission.java: New file.

From-SVN: r37965
2000-12-03 06:34:54 +00:00
Tom Tromey 0fa80ee295 Vector.java (insertElementAt): Unconditionally increment elementCount.
* java/util/Vector.java (insertElementAt): Unconditionally
	increment elementCount.
	(removeRange): Clear unused slots in vector.

From-SVN: r37944
2000-12-02 04:13:52 +00:00
Bryce McKinlay aaa4cecd22 From Adam Welc <welc@cs.purdue.edu>:
* java/util/LinkedList.java (removeFirst): Update `first' field.
	Handle the last == first case.
	(removeLast): Update `last' field. Handle the last == first case.

From-SVN: r37940
2000-12-02 01:48:07 +00:00
Bryce McKinlay db5e49032b natMath.cc: Declare fabsf() function.
2000-12-02  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natMath.cc: Declare fabsf() function.
	* java/lang/mprec.h: Don't include math.h.
	* java/lang/dtoa.c: Include string.h.
	* java/lang/natString.cc (toLowerCase): Initialize ch to prevent
	compiler warning.

From-SVN: r37938
2000-12-02 00:28:44 +00:00
Tom Tromey 239b8e589d Really reverted erroneous checkin
From-SVN: r37930
2000-12-01 22:11:00 +00:00
Tom Tromey 25c7e48745 Reverted erroneous checkin
From-SVN: r37929
2000-12-01 22:04:45 +00:00
Tom Tromey a717799c52 more work
From-SVN: r37926
2000-12-01 21:58:34 +00:00
Warren Levy 21ac293b0e Makefile.am: Added entries for new java.sql modules.
* Makefile.am: Added entries for new java.sql modules.
	* Makefile.in: Rebuilt.

From-SVN: r37919
2000-12-01 18:34:28 +00:00
Warren Levy 89f99caaab mauve-libgcj: Turned on JDK1.2 and turned off tests for classes that aren't quite 1.2...
* mauve-libgcj: Turned on JDK1.2 and turned off tests for classes
	that aren't quite 1.2 compatible yet.

From-SVN: r37913
2000-12-01 10:04:02 +00:00
Warren Levy 2f4671099a Fixed ChangeLog entry to be path specific.
From-SVN: r37908
2000-12-01 02:04:23 +00:00
Warren Levy 6934615b97 Array.java: New file from classpath.
* Array.java: New file from classpath.
	* BatchUpdateException.java: Ditto.
	* Blob.java: Ditto.
	* Clob.java: Ditto.
	* Ref.java: Ditto.
	* SQLData.java: Ditto.
	* SQLInput.java: Ditto.
	* SQLOutput.java: Ditto.
	* Struct.java: Ditto.
	* CallableStatement.java: Merged file from claspath.
	* Connection.java: Ditto.
	* DataTruncation.java: Ditto.
	* DatabaseMetaData.java: Ditto.
	* DriverManager.java: Ditto.
	* PreparedStatement.java: Ditto.
	* ResultSet.java: Ditto.
	* ResultSetMetaData.java: Ditto.
	* SQLException.java: Ditto.
	* SQLWarning.java: Ditto.
	* Statement.java: Ditto.
	* Types.java: Ditto.

From-SVN: r37906
2000-12-01 01:48:34 +00:00
Bryce McKinlay db45aaa691 Check this.len, not len, when determining if there is no more input data.
From-SVN: r37847
2000-11-29 10:37:40 +00:00
Bryce McKinlay d02bc1fb25 InflaterInputStream (read): Don't return -1 unless the infate() call didn't deliver any output.
* java/util/zip/InflaterInputStream (read): Don't return -1 unless
	the infate() call didn't deliver any output. Throw a ZipException if
	the needsDictionary() call returns true.
	* java/io/ByteArrayInputStream (read): Remove redundant bounds checks.
	* java/io/InputStreamReader: Use the default buffer size for the
	contained BufferedInputStream.

From-SVN: r37846
2000-11-29 10:06:03 +00:00
Bryce McKinlay 5662d5333a natSystem.cc (init_properties): Set user.language and user.region.
2000-11-29  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/natSystem.cc (init_properties): Set user.language and
	user.region.
	* configure.in: Check for setlocale.
	* configure: Rebuilt.
	* include/config.h.in: Rebuilt.

From-SVN: r37842
2000-11-29 04:53:37 +00:00
Warren Levy 1326d0c47d DateFormatSymbols.java (zoneStringsDefault): Added more time zone entries.
* java/text/DateFormatSymbols.java (zoneStringsDefault): Added
	more time zone entries.
	* java/text/SimpleDateFormat.java (format): Added case for
	TIMEZONE_FIELD.

From-SVN: r37824
2000-11-28 20:11:46 +00:00
Bryce McKinlay 53a4b7891b DataInputStream.java: Merge classpath docs.
2000-11-28  Bryce McKinlay  <bryce@abatross.co.nz>

	* java/io/DataInputStream.java: Merge classpath docs. Call in.read()
	directly rather than read() in all cases. Make primitive read
	implementations	more efficient, as defined in JDK online docs.
	(skipBytes): Behave like the JDK's implementation.
	* java/io/BufferedReader.java: Merge classpath docs. Check for a
	closed stream with checkStatus() whenever an IOException can be
	thrown.
	(checkStatus): New private method.

From-SVN: r37810
2000-11-28 04:50:51 +00:00
Warren Levy a22add7268 Makefile.am: Added natTimeZone.cc.
* Makefile.am: Added natTimeZone.cc.
	* Makefile.in: Rebuilt.
	* gnu/gcj/text/LocaleData_en.java: Added DateFormat entries.
	* java/text/DateFormatSymbols.java (ampms): Made package private.
	(eras): Made package private.
	(months): Made package private.
	(shortMonths): Made package private.
	(shortWeekdays): Made package private.
	(weekdays): Made package private.
	(formatPrefixes): New private field.
	(localPatternCharsDefault): Made private.
	(dateFormats): New package private field.
	(timeFormats): New package private field.
	(formatsForKey): New private method.
	(DateFormatSymbols(Locale)): Set dateFormats and timeFormats.
	(DateFormatSymbols(DateFormatSymbols)): Ditto.
	* java/text/SimpleDateFormat.java: Merged with Classpath.
	* java/util/TimeZone.java: Merged with Classpath.
	* java/util/natTimeZone.cc: New file.

From-SVN: r37808
2000-11-28 03:09:22 +00:00
Anthony Green 70b642b439 MIssing ChangeLog entry for my last commits.
From-SVN: r37788
2000-11-27 08:48:38 +00:00
Anthony Green 21434cfc60 More new classes.
From-SVN: r37786
2000-11-27 08:44:59 +00:00
Bryce McKinlay f24dbacf85 Vector.java (ensureCapacity): Don't increment modCount.
2000-11-27  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/Vector.java (ensureCapacity): Don't increment modCount.
	(addElement): Don't increment elementCount twice. Doh.
	* java/util/ArrayList.java (add): Only call ensureCapacity if the
	array needs to be expanded.
	(addAll): Ditto.
	* java/util/Collections.java (UnmodifiableCollection): Implement
	toString().
	(UnmodifiableList): Throw UnsupportedOperationException from
	modification methods. Set `l' from the one-parameter constructor.
	(UnmodifiableMap): Implement toString().
	(SynchronizedCollection): Ditto.
	(SynchronizedList): Set `l' from the one-parameter constructor.
	(SynchronizedSortedSet): Set `ss' from the one-parameter constructor.
	(SynchronizedMap): Implement toString().

From-SVN: r37785
2000-11-27 08:30:26 +00:00
Anthony Green ea8136058d Replace stubs with actual implementation
From-SVN: r37782
2000-11-27 06:50:18 +00:00
Anthony Green e36b9711fb More JNDI changes.
From-SVN: r37779
2000-11-27 05:57:58 +00:00
Tom Tromey e9608fe6f0 Reverted erroneous Makefile.am commit
From-SVN: r37774
2000-11-27 04:10:57 +00:00
Bryce McKinlay 68d8c9e3bd Forgot to commit these ChangeLog entries.
From-SVN: r37773
2000-11-27 04:09:54 +00:00
Tom Tromey 0cf17a8051 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added
	RuntimePermission.java.
	* java/lang/RuntimePermission.java: Imported from Classpath.
	* java/lang/Thread.java (getContextClassLoader): Now
	synchronized.  Added security code.
	(setContextClassLoader): Likewise.

From-SVN: r37772
2000-11-27 04:07:48 +00:00
Tom Tromey 2721806e98 prims.cc (_Jv_NewObjectArray): Use const_cast to initialize length field of array.
* prims.cc (_Jv_NewObjectArray): Use const_cast to initialize
	length field of array.
	(_Jv_NewPrimArray): Likewise.
	* gcj/array.h (__JArray): `length' field now const.  Added
	constructor.

From-SVN: r37771
2000-11-27 04:05:23 +00:00
Anthony Green 18205ca3b6 Initial jndi check-in
From-SVN: r37770
2000-11-27 03:16:14 +00:00
Tom Tromey 187d3a0d37 * libjava.compile/weirddecl.java: New file.
From-SVN: r37767
2000-11-26 23:24:21 +00:00
Anthony Green 33c9e2c228 Forgot to commit this ChangeLog
From-SVN: r37752
2000-11-26 07:53:15 +00:00
Anthony Green 31280fb7c4 prims.cc (_Jv_NewObjectArray): Undo placement change.
2000-11-25  Anthony Green  <green@redhat.com>

	* prims.cc (_Jv_NewObjectArray): Undo placement change.
	(_Jv_NewPrimArray): Likewise.
	* gcj/array.h (__JArray): Undo const change.  Removed constructor.
	(class JArray): Removed constructor.

	* java/lang/Thread.java (context_class_loader): New private data.
	(getContextClassLoader): New method.
	(setContextClassLoader): New method.
	(Thread): Initialize context_class_loader.

	* java/net/URLClassLoader.java: Import java.util.Enumeration.
	(getResource): Rename to findResource.
	(findResource): New method.  Used to be getResource.
	(getResourceAsStream): Deleted.
	(jarFileize): Extracted logic from URLClassLoader constructor into
	this new private method.
	(addURL): New protected method.
	(URLClassLoader): Call jarFileize.  Use addElement instead of
	insertElementAt.
	(findResources): New method.

	* java/lang/ClassLoader.java: Import java.util.Enumeration.
	(getResource): Implement correct logic.
	(findResource): New method.
	(getResources): New method.
	(findClass): Create a ClassNotFoundException with the name of the
	class rather than nothing at all.
	(defineClass) Only throw ClassFormatError.

	* java/lang/Class.java (forName): New method.
	* java/lang/Class.h (forName): New method.
	* java/lang/natClass.cc (forName): New method.

From-SVN: r37751
2000-11-26 03:58:56 +00:00
Bryce McKinlay 213858c013 System.java (setProperties): Only call init_properties() if properties is null.
2000-11-24  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/lang/System.java (setProperties): Only call init_properties()
	if properties is null.
	(getProperties): Ditto.
	(getProperty): Ditto.
	(setProperty): Call init_properties if properties are null.
	(prop_init): Remove field.
	* java/lang/natSystem.cc (init_properties): Synchronize the entire
	method. Check for null properties after synchronizing instead of
	prop_init flag. Set the properties field last for thread safety.

	* java/io/ObjectInputStream.java (ObjectInputStream): If DEBUG is set,
	test for gcj.dumpobjects property and enable object stream dumping
	if it is set.
	(dumpElement): No longer native.
	(dumpElementln): Ditto.
	(setDump): Do not define.
	* java/io/natObjectInputStream.cc (dumpElement): Removed.
	(dumpElementln): Removed.
	(setDump): Removed.

2000-11-24  Bryce McKinlay  <bryce@albatross.co.nz>

	* configure: Rebuilt.
	* Makefile.in: Rebuilt.
	* Makefile.am (built_java_source_files): Add Configuration.java.
	* configure.in: Add Configuration.java to CONFIG_FILES. Set
	LIBGCJDEBUG substitution if --enable-libgcj-debug is specified.
	Create `gnu' directory in the build tree.
	* gnu/classpath/Configuration.java.in: New file.

From-SVN: r37749
2000-11-26 01:48:04 +00:00
Anthony Green 00e930367b libjava.exp (bytecompile_file): Change default from javac to gcj -C.
Fri Nov 24 11:25:20 2000  Anthony Green  <green@redhat.com>

	* lib/libjava.exp (bytecompile_file): Change default from javac to
 	gcj -C.
	(libjava_arguments): Fix classpath.

	* libjava.compile/PR129_B.no-link: New file.

From-SVN: r37719
2000-11-24 21:38:16 +00:00
Tom Tromey ad86a903a2 prims.cc (_Jv_NewObjectArray): Use palcement new to create array.
* prims.cc (_Jv_NewObjectArray): Use palcement new to create
	array.
	(_Jv_NewPrimArray): Likewise.
	Include <new>.
	* gcj/array.h (__JArray): `length' field now const.  Added
	constructor.
	(class JArray): Added constructor.

From-SVN: r37718
2000-11-24 21:02:36 +00:00
Tom Tromey 81d87b4e64 * libjava.compile/PR375.java: New file. For PR gcj/375.
From-SVN: r37717
2000-11-24 20:54:56 +00:00
Tom Tromey b5a50b6457 * libjava.compile/PR374.java: New file. For PR gcj/374.
From-SVN: r37716
2000-11-24 20:54:44 +00:00
Mark Wielaard abb32cf595 name-finder.cc (lookup): Check for a NULL _Jv_argv before attempting lookup.
2000-11-23  Mark Wielaard  <mark@klomp.org>

	* name-finder.cc (lookup): Check for a NULL _Jv_argv before
	attempting lookup.

From-SVN: r37687
2000-11-23 05:45:47 +00:00
Bryce McKinlay ebb66eb5fa Vector.java: Improve exception messages.
2000-11-23  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/Vector.java: Improve exception messages.
	(Vector): Check initialCapacity for IllegalArgumentException.
	(tromToSize): Don't check for elementCount == elementData.length
	case.
	(toArray): Don't try to set null marker if target array is the same
	length as the vector.

From-SVN: r37685
2000-11-23 05:18:41 +00:00
Bryce McKinlay 79af883cd4 Makefile.in: Rebuilt.
2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>

	* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added Collections.java.
	* java/util/List.java: Merged from classpath.
	* java/util/Vector.java: Ditto.
	* java/util/Collections.java: From classpath.
	* java/util/ArrayList.java (addAll(Collection)): Call
	addAll(int,Collection) instead of duplicating code.
	(indexOf): Clean up int initialization.
	(clear): Set cleared array entries to null, to allow garbage
	collection.
	* java/util/List.java: Minor formatting fixes.
	* java/util/SimpleTimeZone.java: ditto.

From-SVN: r37652
2000-11-22 11:59:59 +00:00
Tom Tromey 4de5a4d99a Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (core_java_source_files): Added new files.
	* java/lang/reflect/ReflectPermission.java: New class.
	* java/io/FileFilter.java: From Classpath
	* java/io/FilePermission.java: From Classpath.

From-SVN: r37586
2000-11-20 18:25:41 +00:00
Tom Tromey f967de33d7 AccessibleObject.java (isAccessible, [...]): Now public.
* java/lang/reflect/AccessibleObject.java (isAccessible,
	setAccessible): Now public.

From-SVN: r37540
2000-11-18 02:30:29 +00:00
Tom Tromey 9839499072 natString.cc: Include Locale.h.
* java/lang/natString.cc: Include Locale.h.
	(toUpperCase): Added `locale' argument.  Handle locale
	sensitivity.
	(toLowerCase): Added `locale' argument.  Handle locale
	sensitivity.
	(ESSET, CAPITAL_S, SMALL_I, CAPITAL_I_WITH_DOT, SMALL_DOTLESS_I,
	CAPITAL_I): New defines.
	* java/lang/String.java (CASE_INSENSITIVE_ORDER): Now public and
	final.
	Import Locale.
	(toUpperCase, toLowerCase): New methods.  Variants which accept
	locale now native.

	* java/lang/ExceptionInInitializerError.java (printStackTrace):
	New methods.

	* java/util/PropertyPermission.java: Re-merged from Classpath.

	* java/text/RuleBasedCollator.java (getCollationElementIterator):
	New method.
	* java/text/StringCharacterIterator.java: Reindented.
	(setText): New method.

From-SVN: r37539
2000-11-18 02:29:13 +00:00
Mark Wielaard c5f651bf3f backport: *.java: Reformat all to unofficial standard coding style.
Merge with Classpath (changes by Bryce McKinlay)
	* java/util/jar/*.java: Reformat all to unofficial standard coding
	style. No changes of substance.

From-SVN: r37538
2000-11-18 02:00:06 +00:00
Mark Wielaard 4f21aedbf4 * java/util/zip/*.java: Javadoc and copyright updates.
From-SVN: r37526
2000-11-17 21:42:28 +00:00
Tom Tromey 4cdfd292e3 CollationKey.java: Implement Comparable.
* java/text/CollationKey.java: Implement Comparable.
	(compareTo(Object)): New method.
	* java/text/Collator.java (compare(Object,Object)): New method.
	Implement Comparator.

	* java/util/zip/InflaterInputStream.java (available): New method.
	(close): New method.
	(read, available, skip, fill): Throw exception if stream closed.
	* java/util/zip/ZipInputStream.java (read, skip, readFully, fill,
	getNextEntry): Throw exception if closed.

From-SVN: r37525
2000-11-17 20:44:03 +00:00
Tom Tromey 98182da528 PushbackReader.java: Merged with Classpath.
* java/io/PushbackReader.java: Merged with Classpath.
	* java/util/Arrays.java: Updated from Classpath.

	* scripts/blocks.pl: New file.
	* java/lang/Character.java (Subset): New class.
	(UnicodeBlock): New class.

	* java/lang/Math.java (toDegrees, toRadians): New methods.

	* java/lang/Float.java: Implement Comparable.
	(compareTo): New methods.
	* java/lang/Double.java: Implement Comparable.
	(compareTo): New methods.

From-SVN: r37512
2000-11-17 04:51:25 +00:00
Warren Levy 3cd22508eb PropertyChangeSupport.java (propertyListeners): Made transient.
* java/beans/PropertyChangeSupport.java (propertyListeners): Made
	transient.
	(listeners): Made transient.
	(source): Renamed from 'bean'.
	(children): New field for serialization.
	(propertyChangeSupportSerializedDataVersion): Ditto.
	(serialVersionUID): Ditto.
	(writeObject): New serialization method.
	(readObject): New serialization method.
	* java/beans/VetoableChangeSupport.java (propertyListeners): Made
	transient.
	(listeners): Made transient.
	(source): Renamed from 'bean'.
	(children): New field for serialization.
	(vetoableChangeSupportSerializedDataVersion): Ditto.
	(serialVersionUID): Ditto.
	(writeObject): New serialization method.
	(readObject): New serialization method.
	* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Fixed assert
	to allow constructor to have a return type (i.e. the class that the
	constructor constructs).

Serialization mods.

From-SVN: r37506
2000-11-16 21:34:48 +00:00
Tom Tromey 09ad474947 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (libgcj.zip): Fail immediately if compilation fails
	and -k not given.

From-SVN: r37464
2000-11-14 18:59:10 +00:00
Tom Tromey c7e05afb62 sjis_comment3.java: Removed.
* libjava.compile/sjis_comment3.java: Removed.
	* libjava.compile/sjis_comment2.java: Removed.
	* libjava.compile/sjis_comment1.java: Removed.
	* libjava.compile/euc_comment3.java: Removed.
	* libjava.compile/euc_comment2.java: Removed.
	* libjava.compile/euc_comment1.java: Removed.

From-SVN: r37298
2000-11-07 20:48:55 +00:00
Tom Tromey f83c165658 libjava.exp (libjava_arguments): Set --tag on libtool invocation.
* lib/libjava.exp (libjava_arguments): Set --tag on libtool
	invocation.

From-SVN: r37268
2000-11-06 00:22:01 +00:00
Warren Levy a53785f90e ObjectInputStream.java (readObject): Added code to conditionally dump out the serialized data.
* java/io/ObjectInputStream.java (readObject): Added code to
	conditionally dump out the serialized data.
	Handle ENDBLOCKDATA case a bit more gracefully since the current
	behavior doesn't seem to work as expected.
	(readStreamHeader): Added code for serialized data dumper.
	(readNextBlock): Ditto.
	(readFields): Ditto.
	(dump): New private static field for turning on/off dumper.
	(setDump): New native method.
	(dumpElement): New native method.
	(dumpElementln): New native method.
	* java/io/natObjectInputStream.cc (setDump): New method.
	(dumpElement): New method.
	(dumpElementln): New method.

Serialization dumper.  Enable by configuring with --enable-libgcj-debug
and calling java.io.ObjectInputStream.setDump(true) in your test program.
The output will be generated as the object is deserialized (i.e. the
readObject() method is executed).

From-SVN: r37223
2000-11-03 08:04:33 +00:00
Warren Levy 6678181b3c InetAddress.java (addr): Renamed from 'address'.
* java/net/InetAddress.java (addr): Renamed from 'address'.
	(address): New field to match Serialized Form doc.
	(hostName): Renamed from 'hostname' to match Serialized Form doc.
	(family): New serialization field.
	(serialVersionUID): New field.
	(readObject): New method.
	(writeObject): New method.
	(getFamily): New native method.
	(InetAddress): Set family.
	* java/net/natInetAddress.cc (getFamily): New method.
	(addr): Renamed from 'address'.
	(hostName): Renamed from 'hostname' to match Serialized Form doc.
	* java/net/natPlainDatagramSocketImpl.cc (addr): Renamed from 'address'.
	* java/net/natPlainSocketImpl.cc (addr): Renamed from 'address'.

Serialization mod.

From-SVN: r37222
2000-11-03 07:43:06 +00:00
Bryce McKinlay 8d218b6742 AbstractList.java (SubList): Make it a top-level private class.
2000-11-03  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/AbstractList.java (SubList): Make it a top-level private
	class.
	* java/util/LinkedList.java (remove): Do update modCount and
	knownMod.
	(add): Ditto.
	* Makefile.am (ordinary_java_source_files): Add LinkedList.java.
	* Makefile.in: Rebuilt.

From-SVN: r37218
2000-11-03 03:58:05 +00:00
Tom Tromey aca46e2a90 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (install-exec-hook): Make `.la' link, not `.so'
	link.

From-SVN: r37210
2000-11-02 20:33:05 +00:00
Bryce McKinlay 0ad35392f4 AbstractList.java (remove): Comment out modCount increment to work around compiler bug.
2000-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/AbstractList.java (remove): Comment out modCount
	increment to work around compiler bug.
	(add): Ditto.

From-SVN: r37204
2000-11-02 10:17:15 +00:00
Bryce McKinlay 7177dab5c9 AbstractList.java: Throw messages with IndexOutOfBoundsExceptions.
2000-11-02  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/AbstractList.java: Throw messages with
	IndexOutOfBoundsExceptions.
	 (listIterator()): Call listIterator(0).
	(size): New field. Initialize to size().
	(hasNext): Test position against size, not size().
	(remove): Increment knownMod by one instead of resetting it from
	modCount.
	(add): Ditto.
	(SubList.upMod): Removed.
	(SubList.set): Don't call upMod() or update knownMod.
	(SubList.add(int,Object)): Increment modCount instead of calling
	upMod().
	(SubList.remove): Ditto.
	(SubList.addAll): Don't call backingList.size(). Increment size from
	c.size().
	(SubList.iterator): New method. Call listIterator(0).
	(SubList.listIterator): New method. Restore code to return an
	anonymous listIterator implementation (with some changes).
	* java/util/AbstractSequentialList.java: Throw messages with
	IndexOutOfBoundsExceptions.
	(addAll): Add a specnote.
	* java/util/ArrayList.java (removeRange): Get the math right.
	(addAll): Increment modCount _before_ creating iterator.
	* java/util/LinkedList.java: Rewritten, mostly.

From-SVN: r37203
2000-11-02 10:08:03 +00:00
Tom Tromey f92351d76e encodings.pl: Added `ASCII' alias.
* scripts/encodings.pl: Added `ASCII' alias.
	* Makefile.in: Rebuilt.
	* Makefile.am (convert_source_files): Added new files.
	* gnu/gcj/convert/Input_ASCII.java: New file.
	* gnu/gcj/convert/Output_ASCII.java: New file.
	* gnu/gcj/convert/Output_8859_1.java (write): Use `?' to represent
	out-of-range characters.
	* gnu/gcj/convert/natIconv.cc (iconv_init): New method.
	(read): Swap bytes if required.  Treat `count' as character count,
	not byte count.
	(write): Likewise.  Also, handle case where iconv fails on a given
	character.
	(init): Put encoding into exception.
	* gnu/gcj/convert/IOConverter.java (iconv_byte_swap): New global.
	(static): Call iconv_init.  Rebuilt alias list.
	(iconv_init): New private method.

From-SVN: r37190
2000-11-01 17:00:02 +00:00
Tom Tromey 347b93640a Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (install-exec-hook): Only make a single symlink, and
	remove the destination before making the link.
	* configure: Rebuilt.
	* configure.in: Call AC_PROG_LN_S.

From-SVN: r37189
2000-11-01 16:47:06 +00:00
Warren Levy 4547105f64 jni.cc: Added include of java/lang/ThreadGroup.h.
* jni.cc: Added include of java/lang/ThreadGroup.h.
	* gcj/javaprims.h: Removed Replaceable and Resolvable from namespace
	per change of 2000-10-05.

From-SVN: r37173
2000-11-01 00:18:03 +00:00
Bryce McKinlay 67f279dfeb Reader.java: Merge docs from classpath.
* java/io/Reader.java: Merge docs from classpath.
	(skip): Synchronize on `lock'.
	* java/io/FileReader.java: Import correct implementation from
	classpath.
	* java/io/StringReader.java: Merge docs from classpath.
	(ready): Throw IOException if stream is closed.

From-SVN: r37143
2000-10-30 09:20:47 +00:00
Bryce McKinlay 661a98d17a BitSet.java: Updated @specnote.
2000-10-30  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/util/BitSet.java: Updated @specnote.

From-SVN: r37138
2000-10-30 01:51:34 +00:00
Bryce McKinlay 3a73757880 AbstractCollection.java (addAll): Use size() instead of hasNext() in iterator loop.
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
2000-10-29 05:06:10 +00:00