aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
AgeCommit message (Collapse)AuthorFilesLines
2001-03-24HashMap.java (HashMap): If 0 is given for initialCapacity paramater, bump it ↵Bryce McKinlay2-3/+7
to 1. 2001-03-24 Bryce McKinlay <bryce@albatross.co.nz> * java/util/HashMap.java (HashMap): If 0 is given for initialCapacity paramater, bump it to 1. * java/util/Hashtable.java (Hashtable): Likewise. From-SVN: r40812
2001-03-23natDouble.cc (parseDouble): Cannot use errno to check for errors...Per Bothner1-15/+25
* java/lang/natDouble.cc (parseDouble): Cannot use errno to check for errors, since we don't want to throw exception on overflow/underflow. Instead, trim whitespace, and then check that _strtod_r uses up all the rest of the string. From-SVN: r40800
2001-03-23natClass.cc (_Jv_IsAssignableFrom): Checking the ancestors array is invalid ↵Per Bothner1-7/+10
for interfaces... * java/lang/natClass.cc (_Jv_IsAssignableFrom): Checking the ancestors array is invalid for interfaces, so do that *after* check that the target type is not an interface. From-SVN: r40797
2001-03-23jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.Tom Tromey2-14/+7
* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields. * java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField unconditionally. * include/jvm.h (_Jv_ResolveField): Declare. * include/java-interp.h (_Jv_ResolveField): Don't declare. * resolve.cc (_Jv_ResolveField): No longer conditional on INTERPRETER. From-SVN: r40785
2001-03-22Method.java (getExceptionTypes): Call getType() to initialize if ↵Bryce McKinlay3-2/+10
exception_types is null. * java/lang/reflect/Method.java (getExceptionTypes): Call getType() to initialize if exception_types is null. * java/lang/reflect/Constructor.java: Likewise. * java/lang/reflect/natConstructor.cc (getType): Initialize exception_types to an empty Object array. From-SVN: r40730
2001-03-21re PR libgcj/2338 (RandomAccessFile does not create the file if not found)Tom Tromey1-2/+2
* java/io/natFileDescriptorPosix.cc (open): Add O_CREAT in read/write case. Fixes PR libgcj/2338. From-SVN: r40692
2001-03-20TimeZone.java: Sync up with Classpath.Warren Levy1-97/+103
* java/util/TimeZone.java: Sync up with Classpath. Includes new and corrected SimpleTimeZone's for the timezones hash table. From-SVN: r40650
2001-03-19URLStreamHandler.java (parseURL): Fix bug which would "canonicalize" ↵Per Bothner1-1/+1
"../../xxx" to "/xxx". * java/net/URLStreamHandler.java (parseURL): Fix bug which would "canonicalize" "../../xxx" to "/xxx". From-SVN: r40641
2001-03-19ArrayList.java: Remove RCS keywords from commentsMark Wielaard12-533/+785
* java/util/ArrayList.java: Remove RCS keywords from comments * java/util/BasicMapEntry.java: idem * java/util/Dictionary.java: idem * java/util/HashSet.java: idem * java/util/EventObject.java: reindent * java/util/Properties.java: idem * java/util/SortedMap.java: idem * java/util/Enumeration.java: Merge with Classpath * java/util/EventListener.java: idem * java/util/Observable.java: idem * java/util/Observer.java: idem * java/util/Stack.java: idem From-SVN: r40639
2001-03-18natClass.cc (_Jv_CheckCast): add class names to exceptionMark Wielaard1-1/+6
* java/lang/natClass.cc (_Jv_CheckCast): add class names to exception * gnu/gcj/runtime/FirstThread.java (main): replace / with . in jarMainClassName From-SVN: r40604
2001-03-18natString.cc (rehash): Don't bother with memset; _Jv_AllocBytes returns ↵Tom Tromey1-18/+58
zero'd memory. * java/lang/natString.cc (rehash): Don't bother with memset; _Jv_AllocBytes returns zero'd memory. Use _Jv_AllocBytesChecked. Use UNMASK_PTR. (UNMASK_PTR): New macro. (intern): Unmask pointer before returning it. Register finalizer for the string. (unintern): Handle case where (MASK_PTR): New macro. (PTR_MAKSED): Likewise. (_Jv_NewStringUtf8Const): Use UNMASK_PTR. From-SVN: r40593
2001-03-14natThrowable.cc (printRawStackTrace): Copy the stackTrace buffer to a ↵Andrew Haley1-3/+4
correctly aligned pointer array. 2001-03-01 Andrew Haley <aph@redhat.com> * java/lang/natThrowable.cc (printRawStackTrace): Copy the stackTrace buffer to a correctly aligned pointer array. From-SVN: r40456
2001-03-12ExceptionInInitializerError.java (printStackTrace): Only try to print the ↵Bryce McKinlay1-3/+3
subordinate stack trace if "exception" is set. * java/lang/ExceptionInInitializerError.java (printStackTrace): Only try to print the subordinate stack trace if "exception" is set. Print our class name first. From-SVN: r40404
2001-03-12Runtime.java (_exit): Declare new package-private native.Bryce McKinlay5-9/+48
2001-03-12 Bryce McKinlay <bryce@albatross.co.nz> * java/lang/Runtime.java (_exit): Declare new package-private native. * java/lang/natRuntime.cc (_exit): Implemented. Same as exit() but without a security manager check. (exit): Call _exit after security check. * prims.cc (JvRunMain): Call Runtime._exit to shutdown the runtime "naturally". * java/lang/System.java (setSecurityManager): If a security manager is already in place, call checkPermission. * java/lang/ThreadGroup.java (uncaughtException): If printStackTrace() throws an exception, try to deal with it gracefully. * java/lang/ExceptionInInitializerError.java (printStackTrace): Only try to print the subordinate stack trace if "exception" is set. Print our class name first. From-SVN: r40401
2001-03-09re PR libgcj/1971 (ObjectOutputStream generates incorrect serialVersionUID's ↵Tom Tromey1-5/+9
for array classes) * java/io/ObjectStreamClass.java (setUID): Don't write interface info for array classes. Fixes PR libgcj/1971. From-SVN: r40337
2001-03-06TreeSet.java (writeObject): Use a for-loop instead of Iterator.hasNext().Bryce McKinlay2-11/+6
2001-03-06 Bryce McKinlay <bryce@albatross.co.nz> * java/util/TreeSet.java (writeObject): Use a for-loop instead of Iterator.hasNext(). 2001-03-05 Jochen Hoenicke <jochen@gnu.org> * java/util/TreeMap.java (writeObject): Use defaultWriteObject() instead of the new JDK1.2 API. This is simpler and makes back-porting the classes to JDK1.1 trivial. (readObject): likewise. From-SVN: r40252
2001-03-01Changes merged from Kawa's gnu.math.Per Bothner1-15/+10
* java/math/BigInteger.java * gnu/gcj/math/MPN.java (rshift0): New method handles zero shift count. (rshift(int[],int[],int,int): Removed - not needed. (gcd): Use rshift0 rather than rshift. * java/math/BigInteger.java (setShiftRight): Likewise. (divide): Simplify by using rshift0. (divide): Zero-extend results if high-order bit set. From-SVN: r40177
2001-02-23Change to sometimes include class name in ClassFormatError message.Per Bothner1-1/+3
From-SVN: r40030
2001-02-23Throwable.java (CPlusPlusDemangler): Pass -s java to c++filt to select ↵Per Bothner1-1/+1
java-style output. * java/lang/Throwable.java (CPlusPlusDemangler): Pass -s java to c++filt to select java-style output. From-SVN: r40027
2001-02-22re PR java/2040 (java.util.Hashtable(int,float) is stricter than sun's version)Bryce McKinlay2-20/+15
Fix for PR java/2040: * java/util/HashMap.java (HashMap): Don't throw exception for loadFactor > 1. Add exception messages. * java/util/Hashtable.java (Hashtable): Likewise. From-SVN: r39969
2001-02-20PipedWriter.java (flush): Throw exception if stream closed.Tom Tromey4-29/+102
* java/io/PipedWriter.java (flush): Throw exception if stream closed. * java/io/OutputStreamWriter.java (write): Throw exception if stream closed. (writeChars): Don't throw exception if stream closed. * java/io/CharArrayWriter.java (closed): New field. (close): Set it. (flush): Throw exception if stream closed. (reset): Synchronize on correct lock. Allow stream to be reopened. (toCharArray, toString, writeTo): Synchronize. (write): Throwe exception if stream closed. * java/io/BufferedWriter.java (close): Clear `buffer'. (flush): Throw IOException if stream is closed. (write): Likewise. From-SVN: r39927
2001-02-20ThreadGroup.java (activeCount): Only include threads which are alive.Tom Tromey1-7/+16
* java/lang/ThreadGroup.java (activeCount): Only include threads which are alive. (enumerate): Likewise. From-SVN: r39922
2001-02-19CharArrayReader.java (CharArrayReader): Throw IllegalArgumentException if ↵Bryce McKinlay2-10/+13
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-19Integer.java (getInteger): Return default argument if property is not set.Bryce McKinlay2-12/+16
* 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-17* java/util/TimerTask.java: New version from Classpath.Mark Wielaard1-64/+67
From-SVN: r39801
2001-02-17Remerge with Classpath (changes by Bryce McKinlay <bryce@albatross.co.nz>)Mark Wielaard1-80/+111
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-17DataInputStream.java: update copyright noticeMark Wielaard6-35/+139
* 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-16HashSet.java (clone): Made subclass safe, use super.clone(), not new.Bryce McKinlay1-3/+10
* java/util/HashSet.java (clone): Made subclass safe, use super.clone(), not new. From-SVN: r39746
2001-02-16TreeMap.java (nil): Made non-final.Bryce McKinlay1-2/+4
* java/util/TreeMap.java (nil): Made non-final. (clone): Create new nil node for copy. From-SVN: r39736
2001-02-16TreeSet.java (clone): Made subclass safe, use super.clone(), not new.Bryce McKinlay2-6/+22
* java/util/TreeSet.java (clone): Made subclass safe, use super.clone(), not new. * java/util/TreeMap.java (clone): Likewise. From-SVN: r39734
2001-02-15defineclass.cc: Don't include alloca.h.Anthony Green1-9/+1
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-15AbstractSequentialList.java: Synchronize with Classpath.Bryce McKinlay8-126/+576
* java/util/AbstractSequentialList.java: Synchronize with Classpath. * java/util/Collection.java: Likewise. * java/util/Comparator.java: Likewise. * java/util/Dictionary.java: Likewise. * java/util/Iterator.java: Likewise. * java/util/ListIterator.java: Likewise. * java/util/Map.java: Likewise. * java/util/Set.java: Likewise. From-SVN: r39708
2001-02-15* java/util/HashSet.java (clone): Remove try/catch.Bryce McKinlay1-10/+3
From-SVN: r39707
2001-02-15TreeSet.java (clone): Call TreeMap.clone(), not Object.clone().Bryce McKinlay2-19/+14
* java/util/TreeSet.java (clone): Call TreeMap.clone(), not Object.clone(). * java/util/Collections.java (ReverseComparator): New static class. (reverseOrder): Return static instance of ReverseComparator. From-SVN: r39705
2001-02-14natClass.cc (getSignature): Don't try to dereference param_types if it is null.Bryce McKinlay2-16/+17
* java/lang/natClass.cc (getSignature): Don't try to dereference param_types if it is null. Instead, take this to mean "no parameters". * java/lang/TreeMap.java (TreeIterator.next): Throw NoSuchElementException in preference to ConcurrentModificationException. (TreeIterator.remove): Throw IllegalStateException in preference to ConcurrentModificationException. (SubMap.firstKey): Do a better check for empty SubMap, and if it is, throw a NoSuchElementException. (SubMap.lastKey): Likewise. From-SVN: r39658
2001-02-14re PR libgcj/1758 (java.util package lacks TreeMap)Bryce McKinlay5-16/+1756
* java/util/TreeMap.java: New file. * java/util/TreeSet.java: New file. * Makefile.am: Add TreeMap and TreeSet. Enable WeakHashMap. * Makefile.in: Rebuilt. * java/util/HashSet.java (clone): Use constructor instead of calling clone on itself. * java/util/SortedSet.java: Sync with classpath. * java/util/HashMap.java (hash): Use if statement instead of ternary, for clarity. Resolves PR libgcj/1758. Resolves PR java/1684. From-SVN: r39657
2001-02-13PipedReader.java (ready): Throw IOException if pipe closed.Tom Tromey4-19/+29
* 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-13BlockDataException.java: Removed.Bryce McKinlay2-40/+1
* 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-09* java/util/Timer.java: New version from Classpath.Tom Tromey1-429/+492
From-SVN: r39573
2001-02-09Double.java (doubleToRawLongBits): Now native.Bryce McKinlay4-17/+20
* 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-09File.java (java.net): Imported.Alexandre Petit-Bianco1-0/+16
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-09OutputStreamWriter.java: (flush, writeChars): Throw IOException if stream ↵Bryce McKinlay1-1/+7
closed. * java/io/OutputStreamWriter.java: (flush, writeChars): Throw IOException if stream closed. From-SVN: r39559
2001-02-09Byte.java: Remove redundant instanceof and null checks.Bryce McKinlay6-51/+39
* 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* java/lang/Float.java (parseFloat): New method.Tom Tromey1-1/+9
From-SVN: r39555
2001-02-09re PR libgcj/1913 (reading closed streams throws NullPointerException, not ↵Tom Tromey1-1/+10
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-08gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.Joseph Myers2-2/+2
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-07re PR libgcj/1906 (difference between gcj and jdk for MessageFormat)Tom Tromey1-25/+17
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-07re PR java/1895 (Libjava: Arrays.sort doesn't work)Bryce McKinlay1-88/+53
* java/util/Arrays.java: Removed "cmp" methods. (qsort): Don't use "cmp". (med3): Likewise. 2001-02-07 Mark Benvenuto <mcb54@columbia.edu> * java/util/Arrays.java (qsort): Handle N value of 7 with insertion sort. Fix for PR java/1895. From-SVN: r39514
2001-01-27ObjectInputStream.java (read): AND byte with 0xff to make result unsigned.Bryce McKinlay2-15/+43
* 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-26natSystem.cc (getSystemTimeZone): Only use tm_gmtoff and timezone if they ↵Warren Levy1-2/+15
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