2003-11-14 Tom Fitzsimmons <fitzsim@redhat.com>
* java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two
zero-length int arrays when layoutInfo is null.
(getLayoutWeights): Return array of two zero-length double arrays when
layoutInfo is null.
From-SVN: r73622
* jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to
JvGetStringUTFRegion.
* java/lang/natPosixProcess.cc (new_string): Pass length of string
to JvGetStringUTFRegion.
* java/lang/natDouble.cc (parseDouble): Pass length of string to
JvGetStringUTFRegion.
* java/lang/natWin32Process.cc (startProcess): Pass length of
string to JvGetStringUTFRegion.
* java/lang/natClass.cc (forName): Pass length of string to
JvGetStringUTFRegion.
* gnu/gcj/runtime/natNameFinder.cc (getExternalLabel): Pass length
of string to JvGetStringUTFRegion.
* gnu/gcj/convert/natIconv.cc (init): Pass length of string to
JvGetStringUTFRegion.
* gnu/awt/gtk/natGtkLabelPeer.cc (setText): Pass length of string
to JvGetStringUTFRegion.
* gnu/awt/gtk/natGtkButtonPeer.cc (setLabel): Pass length of
string to JvGetStringUTFRegion.
From-SVN: r73571
2003-11-11 Micheal Koch <konqueror@gmx.de>
* java/net/URLStreamHandler.java (toExternalForm): Print port only
if host is printed too and port was really given to URL.
From-SVN: r73445
PR libgcj/12231
* java/lang/Win32Process.java (hasExited) Changed from
public to private.
(startProcess): Likewise.
(cleanup): Likewise.
* java/lang/natWin32Process.cc (cleanup) Don't close
input, output and error streams.
(ChildProcessPipe): New helper class.
(startProcess): Refactored to use ChildProcessPipe.
Use CREATE_NO_WINDOW when launching child process.
From-SVN: r73326
* include/win32.h (_Jv_platform_close_on_exec): Changed
signature and declared extern.
* win32.cc (_Jv_platform_close_on_exec): Implemented.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc
(create): Use new signature of _Jv_platform_close_on_exec.
* gnu/java/net/natPlainSocketImplWin32.cc
(create): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
(accept): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
* java/io/natFileDescriptorWin32.cc (open): Use
_Jv_platform_close_on_exec.
From-SVN: r73325
2003-10-29 Mark Wielaard <mark@klomp.org>
From Guilhem Lavaux <guilhem.lavaux@free.fr>
* java/text/DateFormat.java (Field): New public static inner class.
* java/text/Format.java (Field): Likewise.
(formatToCharacterIterator): New method.
* java/text/FormatCharacterIterator.java: New file.
2003-10-29 Mark Wielaard <mark@klomp.org>
From Guilhem Lavaux <guilhem.lavaux@free.fr>
* java/util/Currency.java: New file.
2003-10-29 Michael Koch <konqueror@gmx.de>
* Makefile.am (ordinary_java_source_files): Added
java/text/FormatCharacterIterator.java and java/util/Currency.java.
* Makefile.in: Regenerated.
From-SVN: r73046
2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz>
* java/lang/reflect/Constructor.java (toString): Avoid extra
whitespace on constructor with no modifiers.
* java/lang/reflect/natConstructor.java (newInstance): Look up
caller and perform accessibility check only if constructor is
non-public and accessible flag is not set.
2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz>
* jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA,
_Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't
use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with
is_virtual_call argument.
* include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from
natClass.cc.
* java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use
_Jv_isVirtualMethod.
* java/lang/reflect/natMethod.cc (invoke): Don't use
_Jv_LookupDeclaredMethod.
(_Jv_CallAnyMethodA): New is_virtual_call argument. If specified,
look up method in target object's vtable.
From-SVN: r72942
PR libgcj/11780:
* java/lang/reflect/natMethod.cc (invoke): Look up caller and
perform accessibility check only if target is non-public and
accessible flag is not set.
* java/lang/reflect/natField.cc (getAddr): Likewise.
From-SVN: r72918
2003-10-24 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkDialogPeer.java (handleEvent):
Remove method.
* gnu/java/awt/peer/gtk/GtkWindowPeer.java (postWindowEvent):
New method.
* java/awt/Window.java (Window(Window,GraphicsConfiguration),
show, hide, dispose, getOwnedWindows): Synchronize on tree lock.
(dispose): Post WINDOW_CLOSED event.
(addWindowFocusListener, addWindowStateListener): Assign result
of multicaster add back to window listener.
(removeWindowFocusListener, removeWindowStateListener): Assign
result of multicaster remove back to window listener.
(dispatchEventImpl): Add null checks for focus and state
listeners.
(processWindowEvent): Handle case where windowListener is null
but state or focus listeners exist.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Add JNI
glue for postWindowEvent.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(window_delete_cb, window_destroy_cb, window_show_cb,
window_focus_in_cb, window_focus_out_cb, window_window_state_cb,
window_get_new_state): New functions.
* jni/gtk-peer/gtkpeer.h: Define window event and frame state
macros. Declare postWindowEventID.
From-SVN: r72906
2003-10-22 Andrew Haley <aph@redhat.com>
* lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
(java_get_callee_fndecl): New.
* jcf-parse.c (java_parse_file): Call emit_catch_table().
* java-tree.h (ctable_decl): New.
(catch_classes): New.
(java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
* decl.c (java_init_decl_processing): Add catch_class_type.
Add ctable_decl.
Add catch_classes field.
* class.c (build_indirect_class_ref): Break out from
build_class_ref.
(make_field_value): Check flag_indirect_dispatch.
(make_class_data): Ditto.
Tidy uses of PUSH_FIELD_VALUE.
Add field catch_classes.
(make_catch_class_record): New.
* java-tree.h (PUSH_FIELD_VALUE): Tidy.
2003-10-22 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (initializeClass): Call
_Jv_linkExceptionClassTable.
(_Jv_LinkSymbolTable): Call )_Jv_ThrowNoSuchMethodError. Call
_Jv_Defer_Resolution on a method whose ncode is NULL.
(_Jv_linkExceptionClassTable): New function.
(_Jv_LayoutVTableMethods): If superclass looks like a constant pool
entry, look it up.
* java/lang/Class.h (struct _Jv_CatchClass): New.
(_Jv_linkExceptionClassTable): New friend.
(_Jv_Defer_Resolution): New friend.
(class Class.catch_classes): New field.
* include/java-interp.h (Jv_Defer_Resolution): New method.
(_Jv_PrepareClass): Make a friend of _Jv_MethodBase.
(_Jv_MethodBase.deferred): New field.
(_Jv_Defer_Resolution): New function.
* resolve.cc (_Jv_PrepareClass): Resolve deferred handlers.
* exception.cc (get_ttype_entry): Change return type to void**.
(PERSONALITY_FUNCTION): Remove all code related to using a
Utf8Const* for a match type. Change match type to be a pointer to
a pointer, rather than a pointer to a Class.
* defineclass.cc (handleCodeAttribute): Initialize
method->deferred.
(handleMethodsEnd): Likewise.
From-SVN: r72886
2003-10-21 Sascha Brawer <brawer@dandelis.ch>
Fix for bug #2944, reported by David Holmes <dholmes@dltech.com.au>
* java/util/logging/ErrorManager.java (everUsed): Made volatile.
(error): Synchronize on instance, not class.
From-SVN: r72750
2003-10-21 Mark Wielaard <mark@klomp.org>
Reported by M.Negovanovic
* java/beans/Introspector.java (getBeanInfo(ClassLoader, String)): New
method.
(reallyFindExplicitBeanInfo): Use new getBeanInfo() method.
From-SVN: r72749
2003-10-21 Michael Koch <konqueror@gmx.de>
* java/nio/ByteOrder.java,
java/nio/DirectByteBufferImpl.java,
java/nio/channels/FileChannelImpl.java:
Add code to load library with code for native methods if needed.
From-SVN: r72747
* java/text/RuleBasedCollator.java
(RuleBasedCollator): Check rules not empty, fixed search in already
existing collation elements.
(is_special): Removed common whitespace characters.
(text_argument): Dont return on whitespaces, add characters between
two ' to string buffer.
From-SVN: r72716
* java/util/zip/InflaterInputStream.java
(InflaterInputStream): Renamed infl to inf and bufsize to size,
added description to exception, check for inf == null and size < 0.
From-SVN: r72519