aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
AgeCommit message (Collapse)AuthorFilesLines
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
2001-01-25* java/lang/sf_fabs.c: Use uint32_t, not __uint32_t.Tom Tromey1-1/+1
From-SVN: r39269
2001-01-24Makefile.in: Rebuilt.Tom Tromey1-0/+47
* Makefile.in: Rebuilt. * Makefile.am (c_source_files): Added sf_fabs.c. * java/lang/sf_fabs.c: New file. From-SVN: r39238
2001-01-20SimpleDateFormat.java (format): Compute hour for cases HOUR_OF_DAY1_FIELD ↵Warren Levy1-6/+6
(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-18* java/bean/Beans.java (instantiate): enable Applet code from ClasspathMark Wielaard1-11/+9
From-SVN: r39105
2001-01-17Class.h (isInterface): Move implementation from natClass.cc.Bryce McKinlay3-13/+13
* 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-17prims.cc (init_prim_class): Deleted.Alexandre Petit-Bianco2-59/+20
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* java/math/BigInteger.java: Update Copyright year.Warren Levy1-1/+1
From-SVN: r39082
2001-01-17BigInteger.java (setShiftRight): Only do negative shift if count != 0.Hans Boehm1-4/+6
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-15All files with updated copyright.Alexandre Petit-Bianco3-19/+79
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-15URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com)Mark Wielaard1-21/+56
* java/net/URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com) (decode): Merge comments with Classpath, don't throw Exception From-SVN: r39030
2001-01-12natSystem.cc: Include locale.h if it exists.Tom Tromey1-0/+4
* java/lang/natSystem.cc: Include locale.h if it exists. * configure: Rebuilt. * configure.in: Check for locale.h. From-SVN: r38957
2001-01-11Cursor.java (Cursor(String)): Set type to custom.Tom Tromey1-3/+5
* java/awt/Cursor.java (Cursor(String)): Set type to custom. (Cursor(int), getPredefinedCursor): Throw exception if argument invalid. From-SVN: r38911
2001-01-10* java/math/BigDecimal.java (divide): Fixed comment.Warren Levy1-1/+1
From-SVN: r38862
2001-01-10re PR libgcj/1596 (setScale() missing from java.math.BigDecimal)Warren Levy1-6/+28
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-09re PR libgcj/1338 (StreamTokenizer does not handle /* comments correctly)Oskar Liljeblad1-49/+49
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-09re PR libgcj/1411 (natTimeZone.cc should be removed)Warren Levy6-139/+205
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-08In gcc/java:Bryce McKinlay5-77/+119
* 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-07Fix bug in URLConnection and correct javadoc annotations in StringBuffer.Anthony Green2-4/+2
From-SVN: r38781
2001-01-06Fix comments for docletsAnthony Green7-14/+19
From-SVN: r38754
2001-01-05* java/io/PipedReader: Synchronize on "lock" instead of this.Bryce McKinlay1-118/+130
From-SVN: r38731
2001-01-05PipedInputStream: Rewrote to be simpler and more correct.Bryce McKinlay4-1240/+856
* 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* java/lang/Thread.java: Update comment.Bryce McKinlay1-6/+3
From-SVN: r38697
2001-01-03ScrollPane.java (setBlockIncrement): Throw error.Tom Tromey2-21/+13
* 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-03ScrollPane.java: Wrote.Tom Tromey6-98/+520
* 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
2000-12-30For boehm-gc:Bryce McKinlay1-6/+19
* 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-28DriverManager.java (getConnection): Don't set user/password properties if null.Jeff Sturm1-2/+4
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-28re PR libgcj/1358 (java.util.Date.toString() doesn't seem to behave properly.)Warren Levy5-16/+15
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-28re PR libgcj/1516 (Method.invoke won't accept boolean parameters)Bryce McKinlay1-34/+34
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-28natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can not be assigned to ↵Bryce McKinlay1-2/+2
Object. * java/lang/natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can not be assigned to Object. From-SVN: r38505
2000-12-27SQLWarning.java: Fixed typo in comment.Petter Reinholdtsen1-1/+1
2000-12-26 Petter Reinholdtsen <pere@hungry.com> * java/sql/SQLWarning.java: Fixed typo in comment. From-SVN: r38493
2000-12-26MenuItem.java (paramString): Now protected.Tom Tromey5-27/+409
* 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-26MenuContainer.java: Fixed typo.Tom Tromey18-50/+761
* 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-26FileDescriptor.java: Initialize fd to -1.Jeff Sturm1-7/+6
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-23* java/lang/mprec.h: Change C9X reference to refer to C99.Joseph Myers1-1/+1
From-SVN: r38481
2000-12-22Throwable.java (trace_enabled): New static field.Bryce McKinlay2-0/+4
* 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-21PropertyChangeListener.java: Extends EventListener.Tom Tromey2-14/+21
* java/beans/PropertyChangeListener.java: Extends EventListener. * java/beans/VetoableChangeListener.java: Extends EventListener. From-SVN: r38421
2000-12-21* java/util/zip/Deflater.java (update, init): Now private.Tom Tromey1-2/+2
From-SVN: r38420
2000-12-21BasicMapEntry.java: Re-added.Bryce McKinlay3-85/+136
* 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-19GregorianCalendar.java (GregorianCalendar): Constructors need to set ↵Warren Levy1-3/+3
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-18Removed additional addNotify() peer hacks.Bryce McKinlay5-9/+7
From-SVN: r38367
2000-12-18Window.java (addNotify): Remove peer casting hack now that gcj/312 is fixed.Bryce McKinlay1-2/+1
* java/awt/Window.java (addNotify): Remove peer casting hack now that gcj/312 is fixed. From-SVN: r38364
2000-12-18natInflater.cc (inflate): Treat Z_BUF_ERROR as end-of-stream if avail_in is 0.Bryce McKinlay1-5/+10
* java/util/zip/natInflater.cc (inflate): Treat Z_BUF_ERROR as end-of-stream if avail_in is 0. From-SVN: r38338
2000-12-17ArrayList.java (data): Declare transient.Bryce McKinlay1-14/+6
* java/util/ArrayList.java (data): Declare transient. (serialPersistantFields): Removed. (readObject): Use defaultReadObject(), not readFields(). (writeObject): Use defaultWriteObject(), not writeFields(). From-SVN: r38328
2000-12-17Hashtable.java (put): Remove `last' variable.Jeff Sturm2-22/+14
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-15ResourceBundle.java (trySomeGetBundle): Pass class loader to Class.forName.Tom Tromey1-1/+3
* java/util/ResourceBundle.java (trySomeGetBundle): Pass class loader to Class.forName. From-SVN: r38289
2000-12-15* java/util/ResourceBundle.javaTom Tromey1-8/+17
(getBundle(String,Locale,ClassLoader)): New method. (trySomeGetBundle): Added `loader' argument. (partialGetBundle): Likewise. From-SVN: r38275
2000-12-15NumberFormat.java (groupingUsed, [...]): Now package-private.Tom Tromey1-6/+6
* java/text/NumberFormat.java (groupingUsed, parseIntegerOnly, maximumFractionDigits, maximumIntegerDigits, minimumFractionDigits, minimumIntegerDigits): Now package-private. From-SVN: r38274