aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
AgeCommit message (Collapse)AuthorFilesLines
2000-12-15* java/lang/Thread.java (checkAccess): Now final.Tom Tromey1-1/+1
From-SVN: r38273
2000-12-15* java/lang/RuntimePermission.java: Class now final.Tom Tromey1-2/+2
From-SVN: r38272
2000-12-15* java/io/StringWriter.java (StringWriter(int)): Now public.Tom Tromey1-4/+4
From-SVN: r38271
2000-12-15* java/io/SerializablePermission.java (legal_names): Now private.Tom Tromey1-3/+3
From-SVN: r38270
2000-12-15Character.java: Updated UnicodeBlock constants.Tom Tromey1-9/+43
* java/lang/Character.java: Updated UnicodeBlock constants. * scripts/blocks.pl: Special case private use and surrogate areas. Updated URL. From-SVN: r38269
2000-12-11* java/util/Hashtable.java (Enumerator.nextElement): Initialize `e'.Bryce McKinlay1-7/+7
From-SVN: r38185
2000-12-11Makefile.am: Add HashSet.java and java/lang/ref classes.Bryce McKinlay15-1969/+2821
* 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-08StringBuffer.java (insert(int,char[])): Avoid NullPointerException so proper ↵Warren Levy1-1/+3
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-08FileInputStream.java (close): Check if the fd is valid.Warren Levy4-8/+8
* 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-07GridBagConstraints.java: Filled in values for static final fields.Tom Tromey1-15/+15
* java/awt/GridBagConstraints.java: Filled in values for static final fields. From-SVN: r38081
2000-12-06* java/util/BitSet.java: Updated copyright notice.Tom Tromey1-4/+21
From-SVN: r38078
2000-12-06Makefile.in: Rebuilt.Tom Tromey1-0/+89
* Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Added new file. * java/awt/GridBagConstraints.java: New file. From-SVN: r38076
2000-12-06Collator.java (decomposeCharacter, [...]): Now package-private, not protected.Tom Tromey5-8/+8
* 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-04TimeZone.java (getAvailableIDs): Activated commented out code dependent on ↵Warren Levy1-10/+0
compiler and library changes. * java/util/TimeZone.java (getAvailableIDs): Activated commented out code dependent on compiler and library changes. From-SVN: r37994
2000-12-04FilePermission.java: Made class final per spec.Warren Levy3-4/+4
* 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-04natDouble.cc: Include fdlibm.h, not mprec.h.Bryce McKinlay1-1/+1
* java/lang/natDouble.cc: Include fdlibm.h, not mprec.h. From Edgar Villanueva <edgarvil@home.com>. From-SVN: r37991
2000-12-04Point2D.java: Added protected constructor.Tom Tromey6-18/+40
* 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-04AWTError.java: Extend Error, not IllegalStateException.Tom Tromey1-6/+6
* java/awt/AWTError.java: Extend Error, not IllegalStateException. From-SVN: r37987
2000-12-03Makefile.in: Rebuilt.Tom Tromey1-0/+345
* Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Added new file. * java/awt/geom/RoundRectangle2D.java: New file. From-SVN: r37980
2000-12-03Makefile.in: Rebuilt.Tom Tromey1-0/+250
* Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Added new file. * java/awt/FlowLayout.java: New file. From-SVN: r37968
2000-12-03Makefile.in: Rebuilt.Tom Tromey1-0/+268
* Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Added new file. * java/awt/GridLayout.java: New file. From-SVN: r37967
2000-12-03Makefile.in: Rebuilt.Tom Tromey2-0/+401
* 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-02Vector.java (insertElementAt): Unconditionally increment elementCount.Tom Tromey1-2/+7
* java/util/Vector.java (insertElementAt): Unconditionally increment elementCount. (removeRange): Clear unused slots in vector. From-SVN: r37944
2000-12-02From Adam Welc <welc@cs.purdue.edu>:Bryce McKinlay1-1/+11
* 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-02natMath.cc: Declare fabsf() function.Bryce McKinlay4-2/+5
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-01Array.java: New file from classpath.Warren Levy21-20/+3786
* 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-11-29Check this.len, not len, when determining if there is no more input data.Bryce McKinlay1-1/+1
From-SVN: r37847
2000-11-29InflaterInputStream (read): Don't return -1 unless the infate() call didn't ↵Bryce McKinlay3-15/+11
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-29natSystem.cc (init_properties): Set user.language and user.region.Bryce McKinlay1-1/+26
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-28DateFormatSymbols.java (zoneStringsDefault): Added more time zone entries.Warren Levy2-3/+23
* 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-28DataInputStream.java: Merge classpath docs.Bryce McKinlay2-58/+211
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-28Makefile.am: Added natTimeZone.cc.Warren Levy4-556/+2182
* 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-27Vector.java (ensureCapacity): Don't increment modCount.Bryce McKinlay3-39/+38
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-27Makefile.in: Rebuilt.Tom Tromey3-7/+175
* 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-26prims.cc (_Jv_NewObjectArray): Undo placement change.Anthony Green6-77/+187
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-26System.java (setProperties): Only call init_properties() if properties is null.Bryce McKinlay4-74/+54
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-23Vector.java: Improve exception messages.Bryce McKinlay1-18/+23
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-22Makefile.in: Rebuilt.Bryce McKinlay5-383/+2786
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-20Makefile.in: Rebuilt.Tom Tromey3-0/+350
* 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-18AccessibleObject.java (isAccessible, [...]): Now public.Tom Tromey1-26/+26
* java/lang/reflect/AccessibleObject.java (isAccessible, setAccessible): Now public. From-SVN: r37540
2000-11-18natString.cc: Include Locale.h.Tom Tromey6-159/+302
* 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-18backport: *.java: Reformat all to unofficial standard coding style.Mark Wielaard7-1323/+1455
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-17* java/util/zip/*.java: Javadoc and copyright updates.Mark Wielaard18-195/+666
From-SVN: r37526
2000-11-17CollationKey.java: Implement Comparable.Tom Tromey4-10/+49
* 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-17PushbackReader.java: Merged with Classpath.Tom Tromey6-811/+1742
* 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-16PropertyChangeSupport.java (propertyListeners): Made transient.Warren Levy3-21/+94
* 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-03ObjectInputStream.java (readObject): Added code to conditionally dump out ↵Warren Levy2-21/+119
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-03InetAddress.java (addr): Renamed from 'address'.Warren Levy4-37/+103
* 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-03AbstractList.java (SubList): Make it a top-level private class.Bryce McKinlay2-219/+233
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-02AbstractList.java (remove): Comment out modCount increment to work around ↵Bryce McKinlay1-2/+4
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