2004-02-06 Jeroen Frijters <jeroen@frijters.net>
* java/io/ObjectInputStream.java: Made all calls
to dumpElement[ln] conditional on dump flag. (readObject): Changed to
use cached info from ObjectStreamClass. (readClassDescriptor):
Cache more information in ObjectStreamClass. (processResolution,
readFields): Use cached info from ObjectStreamClass.
(newObject): Throw exception instead of returning null for failure.
(getField, getMethod, callReadMethod, setBooleanField, setByteField,
setCharField, setDoubleField, setFloatField, setIntField,
setLongField, setShortField, setObjectField, readObjectParams):
Removed. (dumpElement, dumpElementln): Removed dump flag condition
check.
* java/io/ObjectStreamField.java (hasReadMethod): Removed.
(setClass): Added call to cacheMethods() (findMethod): New method.
(cacheMethods): New method. (ObjectStreamClass): Added call to
cacheMethods(). (setFields): Cache fields. (getClassUID): Use
AccessController.doPrivileged to invoke setAccessible.
(readObjectMethod, readResolveMethod, realClassIsSerializable,
realClassIsExternalizable, fieldMapping, firstNonSerializableParent):
New fields.
* java/io/ObjectStreamField.java (ObjectStreamField): New constructor.
(ObjectStreamField): Removed FIXME workaround. (getTypeString,
isPrimitive): Made safe for cases where type == null.
(setBooleanField, setByteField, setCharField, setShortField,
setIntField, setLongField, setFloatField, setDoubleField,
setObjectField): New methods.
From-SVN: r77395
2004-02-05 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/Scrollbar.java (next_scrollbar_number): New field.
(Scrollbar (int, int, int, int, int)): Make default page
increment 10.
(setValues): Only call peer.setValues if one of the values has
changed.
(generateName): New method.
(getUniqueLong): New method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
(range_scrollbar): Remove structure.
(post_adjustment_event): Remove function.
(post_change_event): Accept jobject argument.
(create): Cast jints to gdoubles. Round scrollbar values to the
nearest integer. Clamp min, max and value settings.
(connectJObject): Connect hook to widget->window.
(connectSignals): Remove range_scrollbar structure variables.
Remove "move-slider" connection. Pass global peer reference to
"value-changed" callback.
(setLineIncrement): Cast jint value to gdouble.
(setPageIncrement): Likewise.
(setValues): Likewise. Clamp min, max and value settings.
From-SVN: r77332
* gnu/java/nio/NIOServerSocket.java
(impl): Unused, removed.
* gnu/java/nio/SocketChannelImpl.java
(finnishConnect): Don't throw NoConnectionPendingException if not
connected or no connection pending.
From-SVN: r77317
* java/awt/geom/AffineTransform.java:
Corrected comments on the field definitions for
m11 and m10.
(shear): Fixed few errors that caused shear
transformation to be performed incorrectly.
(createInverse): Fixed to return correct
inverse of the given matrix.
From-SVN: r77261
2004-02-03 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkListPeer.java,
java/awt/BorderLayout.java, java/awt/CardLayout.java,
java/awt/CheckboxGroup.java, java/awt/Choice.java,
java/awt/Component.java, java/awt/Container.java,
java/awt/FontMetrics.java, java/awt/GridBagLayout.java,
java/awt/LayoutManager2.java, java/awt/List.java,
java/awt/Menu.java, java/awt/MenuBar.java,
java/awt/MenuItem.java, java/awt/Polygon.java,
java/awt/Rectangle.java, java/awt/ScrollPane.java,
java/awt/Scrollbar.java, java/awt/TextArea.java,
java/awt/TextField.java,
java/awt/image/renderable/RenderContext.java,
javax/swing/JApplet.java: Fix handling of alias methods, where a
method has been deprecated in favour of a new one with the same
funtion but a different name. Put the method implementation in
the deprecated method and have the new method call the
deprecated one. Make all other code call the new method.
From-SVN: r77178
(inChannelOperation): New field.
(isInChannelOperation): New accessor.
(setInChannelOperation): New modifier.
(receive): Use capacity() - position() of destination
buffer instead of remaining(). Set and reset our "in
channel operation indicator" before and after delegating
the receive to our datagram socket. Removed testing code.
Update destination buffer's current position if it is
backed by a byte array (hasArray() is true).
(send): Set and reset our "in channel operation indicator"
before and after delegating the send to our datagram socket.
Removed testing code. Update source buffer's current position
if it is backed by a byte array (hasArray() is true).
* gnu/java/nio/SocketChannelImpl.java (read(ByteBuffer)):
Use capacity() - position() of destination buffer instead
of remaining().
* java/net/DatagramSocket.java (receive): Don't throw an
IllegalBlockingModeException if we have a non-blocking
channel which initiated this operation.
(send): Likewise.
From-SVN: r77173
(inChannelOperation): New field.
(isInChannelOperation): New accessor.
(setInChannelOperation): New modifier.
* gnu/java/nio/ServerSocketChannelImpl.java
(accept): Set and reset our server socket's PlainSocketImpl's
"in channel operation" indicator before and after delegating
the accept to our server socket.
* gnu/java/nio/SocketChannelImpl.java
(connect): Set and reset our socket's PlainSocketImpl's "in channel
operation" indicator before and after delegating the operation to
our socket.
(read): Likewise.
(write): Likewise.
* java/net/ServerSocket.java (implAccept): Don't throw an
IllegalBlockingModeException if we have a non-blocking
channel which initiated this accept operation.
* java/net/Socket.java (connect): Don't throw an
IllegalBlockingModeException if we have a non-blocking
channel which initiated this connect operation.
* java/nio/channels/spi/AbstractSelectableChannel.java
(configureBlocking): Only call implConfigureBlocking() if
the desired blocking mode is different from our current one.
From-SVN: r76956
* java/io/BufferedReader.java (sbuf): New field.
(readLine): Use String.valueOf instead of new String() as per
Per Bothner's suggestion. Use instance sbuf field instead of a
local StringBuffer instance.
* java/io/InputStreamReader.java (read(char[],int,int)): Pass the
caller's buffer to refill().
(read(void)): Pass our internal work buffer to refill if our
input queue is empty.
(refill): Changed return type to int. Use the specified buffer
instead of our work buffer as per Bryce McKinlay's suggestion.
Return the number of characters read or -1 for EOF.
From-SVN: r76927
* gnu/java/awt/peer/gtk/GtkFramePeer.java
(gtkLayoutSetVisible): New method
(setMenuBar): Hide layout before setting MenuBar
and reshow it after.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(gtkLayoutSetVisible): Hide or show the Gtk Layout.
From-SVN: r76861
* gnu/java/awt/peer/gtk/GtkFramePeer.java
(removeMenuBarPeer): Remove MenuBarPeer argument.
* gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
(dispose): Call native method.
* java/awt/Frame.java (setMenuBar): Create and remove
MenuBar peers only if the Frame has a peer.
(addNotify): Create the MenuBar peer if one exists.
(removeNotify): Remove MenuBar peer if one exists.
* java/awt/Menu.java: Fix imports.
(addNotify): Don't use full class name.
(removeNotify): Call removeNotify on all children.
* java/awt/MenuBar.java (removeNotify): Call
removeNotify on all children.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(removeMenuBarPeer): Remove MenuBarPeer argument.
Iterate through children to find the Frame's MenuBar.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c
New file.
(dispose): Remove references to the MenuComponent.
From-SVN: r76740
2004-01-26 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java (moveLayout): New
method.
(setMenuBar): Shift the Gtk layout up/down by the MenuBar
height and let the Layout Managers readjust anything that
needs to move.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(moveLayout): New method. Shift everything in the Gtk
layout in the Y direction by an offset.
From-SVN: r76729
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(handleEvent): Implemented. Handles PaintEvents.
(paint): Implemented. Use GTK native methods to queue updates
for this heavyweight peer.
* gnu/java/awt/peer/gtk/GtkContainerPeer.java
(handleEvent): Removed.
* java/awt/Component.java
(paint): Implemented. Explictly paint the heavyweight peer.
(update): Clear the background for heavyweight components.
(paintAll): No need to call peer.paint() anymore.
(processEvent): Don't process PaintEvents here. It's now done in
the peer's handleEvent().
(processPaintEvent): Removed.
* java/awt/Container.java
(paint): No need to call super.paint(). Visit heavyweight
children as well.
(update): Don't clear the background here. It's done in
Component.update().
(visitChildren): Added check to not recurse into Containers.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(filter_expose_event_handler): New method. Filter unwanted
expose events while painting heavyweight peers.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_addExposeFilter):
New method. Connect filter and block pre_event_handler.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_removeExposeFilter):
New method. Disconnect filter and unblock pre_event_handler.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetQueueDrawArea):
New method. Invalidate and update given area.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Add checks for unwanted expose events.
From-SVN: r76668
2004-01-25 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/TextArea.java: Fix indentation. Flesh out javadocs.
(getMinimumSize (int, int)): Fix FIXME -- return Dimension (0,0)
when peer is null.
(setColumns): Remove FIXME -- peer will retrieve number of
columns by calling getColumns.
(setRows): Likewise for number of rows.
(next_text_number): New field.
(paramString): Fix param string.
(generateName): New method.
(getUniqueLong): New method.
From-SVN: r76577
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR)
[!__powerpc64__]: Corrected to handle kernels with changed ucontext.
* include/powerpc-signal.h: Add #ifndef __powerpc64__ around the
header. For __powerpc64__ provide the default-signal.h definitions
for now.
* include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h
instead of the dummy definitions.
* configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC.
(powerpc64*-*): Remove with_libffi_default.
Only add -mminimal-toc for 64-bit compilations.
* configure.in: Use powerpc-signal.h on powerpc64 as well.
(x86_64-*-linux*): Set SIGNAL_HANDLER_AUX.
Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h.
* configure: Rebuilt.
From-SVN: r76437
* java/io/FileDescriptor.java
(lock): New method.
(tryLock): New method.
(unlock): New method.
* java/io/natFileDescriptorEcos.cc
(lock): New method.
(tryLock): New method.
(unlock): New method.
* java/io/natFileDescriptorPosix.cc
(lock): New method.
(tryLock): New method.
(unlock): New method.
* java/io/natFileDescriptorWin32.cc
(lock): New method.
(tryLock): New method.
(unlock): New method.
From-SVN: r76421
* gnu/java/net/protocol/http/Connection.java
(connect): Don't initialize bufferedOutputStream if not needed.
(sendRequest): Set property for content length if content is present.
Write content only if present.
(getOutputStream): Check if already connected, dont connect,
initalize bufferedOutputStream if needed.
From-SVN: r76412
2004-01-23 Michael Koch <konqueror@gmx.de>
* java/io/FileDescriptor.java: Merged copyright with classpath to
start merging this class.
From-SVN: r76408
Michael Koch <konqueror@gmx.de>
* javax/swing/table/DefaultTableCellRenderer.java
(DefaultTableCellRenderer): Added javadoc for the class and for
the constructor, Border instance, create an EmptyBorder.
(UIResource): Removed the comment at the end of the class
(setForeground): New method.
(setBackground): New method.
(updateUI): New method.
(getTableCellRendererComponent): Rewritten with the help of
dvholten and Stephane Meslin-Weber.
(validate): New method.
(repaint): New method.
(firePropertyChange): New method.
(setValue): New method.
Co-Authored-By: Michael Koch <konqueror@gmx.de>
From-SVN: r76372
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(connectJObject): Replace printf calls with g_assert statements.
Move property-notify-event signal connection to ...
(connectSignals): Connect property-notify-event signal. Iterate
through the vbox's children to find layout.
From-SVN: r76367
* java/awt/Container.java
(LightweightDispatcher.handleEvent): Add an extra check to avoid
dispatching MOUSE_ENTERED event twice. Translate the point for
the mouse event target before dispatching the event.
From-SVN: r76278
2004-01-20 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkTextFieldPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
(native create): Add width parameter.
(create): Calculate text entry width based on current font's
metrics and number of columns. Set TextField's font if not
already set. Call native create.
(gtkEntryGetBorderWidth): New native method.
(gtkEntryGetSize): Remove method.
(getMinimumSize): Call minimumSize.
(getPreferredSize): Call preferredSize.
(minimumSize): Calculate minimum size based on backing
GtkEntry's borders, font metrics and number of columns.
(preferredSize): Likewise for preferred size.
(get_border_width): New static function.
From-SVN: r76228
2004-01-20 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java (setResizable):
Override GtkWindowPeer's setResizable method to account for menu
bar height when setting the frame's size.
From-SVN: r76227
* java/awt/EventQueue.java (pop): Prevent racing condition to add
events to the queue out of order by acquiring locks in the proper
order and not by releasing one before acquiring the other.
From-SVN: r76161
2004-01-19 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java (getMenuBarHeight): Added
MenuBarPeer parameter.
(removeMenuBarPeer): New native method.
(setMenuBar): Call remove if menu bar is null. Adjust insets
appropriately.
(postSizeAllocateEvent): New method. Called when menu bar size is
allocated. Adjust insets and redo layout.
(GtkFramePeer): Set menu bar during frame creation.
(postConfigureEvent): Adjust position and size to accomodate
menu bar.
* java/awt/Frame.java (setMenuBar): addNotify to create menu bar.
* java/awt/Menu.java (addSeparator): Use peer's addSeparator.
(addNotify): Create the peer if it doesn't exist and call addNotify
for the menu's items.
* java/awt/MenuBar.java (addNotify): Create this menu bar's menus.
* java/awt/MenuItem.java (addNotify): Create the peer if it
doesn't exist.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(removeMenuBarPeer): New method. Remove menu bar on the current
frame.
(setMenuBarPeer): Add the menu bar to the current frame and the
callback for size-allocate events on the menu bar.
(getMenuBarHeight): Add menu bar parameter.
(menubar_resize_cb): New callback method for postSizeAllocate events.
Also: Fix indentation on last ChangeLog entry.
From-SVN: r76149
2004-01-16 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java (GtkComponentPeer): If
it is a FileDialog and has dimensions of 0 by 0, then the initial
size is set to size request plus insets.
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
(gtkWidgetGetDimensions): Override method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(gtkWidgetGetDimensions): Override method. Returns size request plus
insets.
From-SVN: r75993
* java/awt/EventDispatchThread.java (run): Stop running when
interrupted.
* java/awt/EventQueue.java (pop): Stop dispatch thread when done.
Reset the queue after transferring its contents.
(push): Start a new dispatch thread if none is running.
From-SVN: r75977
* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
Implemented rendering hints related methods.
(getDefaultHints): New helper method. Returns
default rendering hints.
(walkPath): changed to normalize path if
the KEY_STROKE_CONTROL key is in "normalize" mode.
(draw3DRect): changed coordinates of rectangle by +0.5
if in "normalize" mode.
From-SVN: r75943
2004-01-13 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
(native create): Add width and height parameters. Set text
view's size request according to new parameters.
(create): Calculate text view size based on current font's
metrics and number of rows and columns. Set TextArea's font if
not already set. Call native create.
(getMinimumSize): Call minimumSize.
(getPreferredSize): Call preferredSize.
(getHScrollbarHeight): New method.
(getVScrollbarWidth): New method.
(minimumSize): Calculate minimum size based on scrollbar
visibility, scrollbar sizes, font metrics and number of rows and
columns.
(preferredSize): Likewise for preferred size.
(gtkTextGetSize): Remove method.
From-SVN: r75817
* gnu/java/awt/peer/gtk/GtkContainerPeer.java
(setBackground): New method. Children with no explicitly-set
background will be repainted with the parent container's new
background color.
From-SVN: r75809
* gnu/java/awt/peer/gtk/TestAWT.java: Fix test program so that it does
not show modal dialogs twice and so that it allows showing a modal
dialog from another modal dialog.
From-SVN: r75803
* java/awt/Dialog.java (show): Enable blocking for all modal dialogs
and run secondary dispatch thread to process event queue while this
thread is blocked.
From-SVN: r75788
* gnu/java/lang/reflect/TypeSignature.java
(getEncodingOfClass): Documentation fixed.
(getClassForEncoding): Give class loader to Class.forName().
Documentation fixed.
From-SVN: r75675
2004-01-09 Andrew Haley <aph@redhat.com>
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Resolve
a Utf8Const field before looking at its class.
From-SVN: r75591
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java (nativeSetFile):
New name for the former setFile native method.
(setFile): New method.
(setDirectory): Implemented.
(connectSignals): New native method.
(setFilenameFilter): Improve comment.
(getGraphics): Comment.
(gtkHideFileDialog): New method.
(gtkDisposeFileDialog): New method.
(gtkSetFilename): New method.
* java/awt/Dialog.java (show): Block on modal dialogs, but only
for FileDialog for now.
(hide): New method.
(dispose): New method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
(Java_gnu_java_awt_peer_gtk_GtkFileDialog_create): Replace
deprecated creation functions. Make dialog modal. Add it to the
window group.
(Java_gnu_java_awt_peer_gtk_GtkFileDialog_connectSignals): New
function.
(Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_gtkFileSelectionSetFilename):
Rename to...
(Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetFile): New
name.
(window_closed): New function.
(ok_clicked): New function.
(cancel_clicked): New function.
From-SVN: r75557
PR libgcj/13439:
* verify.cc (state::merge): Copy changed locals out of subroutine
in NO_STACK case.
(state::FLAG_CHANGED): New const.
(state::FLAG_UNUSED): Likewise.
(state::local_changed): Removed. Updated all users.
(state::flags): New field.
(state::merge): Added jsr_semantics argument, more logic.
(push_jump_merge): Added jsr_semantics argument.
(handle_jsr_insn): Set jsr_semantics on push_jump_merge when
merging through the jsr instruction.
From-SVN: r75533
* java/awt/Container.java
(update): Clear only the clipped region, instead of clearing the
entire Container.
(visitChildren): Visit children in descending order.
From-SVN: r75517
* java/text/CollationElementIterator.java
(textIndex): Renamed from index.
* java/text/CollationKey.java
(collator): New member.
(CollationKey): New argument for parent collator.
(equals): Check for same collator, source string and key array.
* java/text/RuleBasedCollator.java:
Reformated.
(RuleBasedCollator): Don't re-initialize frenchAccents with default
value.
(getCollationElementIterator): Rewritten.
(getCollationKey): Added new argument to CollationKey constructor.
From-SVN: r75510
* java/net/URLConnection.java
(contentHandler): Removed.
(locale): Removed.
(getHeaderFields): Return an empty map instead of null.
(getContent): Connect if needed, renamed "cType" to "type" and
"contentHandler" to "ch" and made it a local variable.
(getPermission): Don't use package in class name.
(setDefaultRequestProperty): Fixed typo in documentation.
(initializeDateFormats): Made locale a local variable.
From-SVN: r75466
* java/lang/Package.java
(getPackage): Get the current class loader directly.
* java/lang/SecurityManager.java
(currentLoadedClass): Dont iterate over class contexts.
(classLoaderDepth): Don't check class loaders if everything is allowed.
From-SVN: r75465
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Set all insets to 0 when a Configure event
is received for a GtkPlug.
* gnu/java/awt/EmbeddedWindow.java (window_id): Rename handle.
Make handle long, not int.
(EmbeddedWindow()): New constructor.
(EmbeddedWindow(int)): Rename window_id to handle. Make handle
long, not int.
(setHandle): New method.
(getHandle): Return long, not int.
* gnu/java/awt/peer/EmbeddedWindowPeer.java (embed): New method
declaration.
* gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c:
(create(long)): Take long parameter, not int. Cast gtk_plug_new
argument to GdkNativeWindow.
(construct): New method.
(embed): New method.
From-SVN: r75447
* gnu/java/awt/peer/gtk/GtkScrollPanePeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c
(create(int, int)): New method.
(create): Call new create method.
(gtkScrolledWindowNew, gtkScrolledWindowSetSize): Remove
methods.
(childResized): Remove native implementation. Implement in
Java.
(getHScrollbarHeight, getVScrollbarWidth): Call
gtk_widget_size_request to get scrollbar dimensions.
* java/awt/ScrollPane.java (getViewportSize): Reimplement. Only
call getVScrollbarWidth and getHScrollbarHeight when vertical
and horizontal scrollbars respectively are needed.
(doLayout): Enlarge child if it is smaller than the viewport.
From-SVN: r75446
* java/awt/Dialog.java (constructor): Accept null title as per spec.
* java/awt/FileDialog.java (constructor): Throw exception on invalid
argument as per spec.
From-SVN: r75444
2004-01-05 Fernando Nasser <fnasser@redhat.com>
* java/awt/Choice.java (add): Leave posting of ItemEvents to peer.
(insert): Ditto.
(remove): Ditto. Also, Check for valid argument.
(removeAll): Use peer interface method.
* gnu/java/awt/peer/gtk/GtkChoicePeer.java (nativeAdd): New name for
native add function.
(nativeRemove): New name for native remove function.
(getHistory): New native function.
(constructor): Generate ItemEvent.
(add): Ditto, if selection is changed.
(remove): Ditto, ditto.
(removeAll): Add implementation.
(handleEvent): Remove. Dead code.
(choicePostItemEvent): Add comment.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Add comments.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Rename to...
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeAdd): New name. Add
comments and fix condition to change selection.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Rename to...
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemove): New name. Add
remove all capability.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_getHistory): New function.
(item_activate): Add cast to remove compiler warning.
From-SVN: r75443
* gnu/java/net/protocol/http/Connection.java
(sendRequest): Dont encode output in default character encoding,
add correct version number to HTTP user agent string.
From-SVN: r75266
2003-12-30 Guilhem Lavaux <guilhem@kaffe.org>
* java/util/GregorianCalendar.java
(computeFields): Reported by Ito Kazumitsu <kaz@maczuka.gcd.org>.
Fixed the computation of DAY_OF_WEEK_IN_MONTH.
(computeTime): 12:00 midnight is AM and 12:00 noon is PM.
2003-12-30 Michael Koch <konqueror@gmx.de>
* testsuite/libjava.mauve/xfails: Removed the following testcase
because it passes now:
FAIL: gnu.testlet.java.text.SimpleDateFormat.Test: parse() strict
(number 1)
From-SVN: r75244
* gnu/java/net/protocol/http/Connection.java
(outputStream): New field.
(bufferedOutputStream): New field.
(connect): Initialize outputStream and bufferedOutputStream.
(sendRequest): Create PrintWriter object from outputStream,
support HTTP 1.1, send missing HTTP headers and buffered output data
for POST method.
(getOutputStream): Set request method to POST if output stream is
used, return bufferedOutputStream.
(setRequestMethod): Allow HEAD and POST methods.
This fixes libgcj PR/6302 and libgcj PR/7752.
From-SVN: r75233
* gnu/java/net/protocol/http/Connection.java
(requestProperties): New field.
(addRequestProperty): New method.
(getRequestProperty): New method.
(setRequestProperty): New method.
(getRequestProperties): New method.
From-SVN: r75228
* gnu/java/net/protocol/http/Connection.java
(inputStream): Made it a DataInputStream.
(requestProperties): Removed.
(hdrHash): Removed.
(hdrVec): Removed.
(headers): New field to store headers.
(connect): Initialize inputStream.
(receiveReply): Merged from classpath. The new algorithm is line based
instead of character based.
(getHeaderField): Use headers.
(getHeaderFields): Use headers.
(getKey): Removed.
(getField): Removed.
* gnu/java/net/HeaderFieldHelper.java: New file.
* Makefile.am (ordinary_java_source_files):
Added gnu/java/net/HeaderFieldHelper.java.
* Makefile.in: Regenerated.
From-SVN: r75183
* java/io/LineNumberReader.java
(mark): Improved error checking.
(read): Likewise.
(skip): Likewise. Skip is now really eating the specified number of
characters.
* java/io/CharArrayReader.java (read): It should throw
IndexOutOfBoundsException and not ArrayIndexOutOfBoundsException (see
mauve).
* java/io/BufferedReader.java (readLine): Make readLine() really block
until either EOF is reached or a true error happens.
From-SVN: r75180
* gnu/java/net/protocol/http/Connection.java
(connect): Call receiveReply().
(receiveReply): Renamed from getHttpHeaders().
(getOutputStream): Moved check on doOutput before check for connection
state.
From-SVN: r75172
2003-12-27 Guilhem Lavaux <guilhem@kaffe.org>
* java/rmi/Naming.java (lookup): Check if the first character of the
filename returned by URL.getFile() is a '/', only if it is the case
we cut this first character and call the registry with the good name.
(bind): Likewise.
(rebind): Likewise.
From-SVN: r75044
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
Mark Wielaard <mark@klomp.org>
* java/io/BufferedReader.java (BufferedReader):
Throw IllegalArgumentException when size <= 0.
(mark): Document and better exception message for negative
readLimit IllegalArgumentException.
(read(char[],int,int)): Throw IndexOutOfBoundsException
if offset and count are not valid regarding buf.
(skip): Throw IllegalArgumentException when count is negative.
Co-Authored-By: Mark Wielaard <mark@klomp.org>
From-SVN: r75041
* java/io/FileInputStream.java
(FileInputStream(String)): Call FileInputStream(File).
(FileInputStream(File)): Check whether the argument is a directory.
From-SVN: r75039
Mark Wielaard <mark@klomp.org>
* gnu/java/rmi/server/UnicastConnectionManager.java
(startScavenger): Set the client connection manager to daemon
state because it may block clients until TIMEOUT is reached
when they are exiting.
* gnu/java/rmi/RMIVoidValue.java: New file for a class representing
a void return.
* gnu/java/rmi/server/UnicastRemoteCall.java
(DummyOutputStream): Add a boolean before each written field to
know whether it is a primitive.
(releaseOutputStream): Flush parameters at write time.
* gnu/java/rmi/server/UnicastServerRef.java
(incomingMessageCall): Return a RMIVoidValue if no value is to be
returned.
* gnu/java/rmi/server/UnicastServer.java
(incomingMessageCall): Do not write a returned object if it is
a RMIVoidValue.
Co-Authored-By: Mark Wielaard <mark@klomp.org>
From-SVN: r75033
2003-12-25 Michael Koch <konqueror@gmx.de>
* java/net/ServerSocket.java bind():
If InetSocketAddress.getAddress() returns "null" use "0.0.0.0" as
address to bind to.
From-SVN: r75023
* java/io/ObjectInputStream.java
(getField): Handle transient and non persistent fields.
(readClassDescriptor): Better error handling, use the right
class loader.
(readFields): Fields marked as not present in the stream
or not to be set are not read and set.
* java/io/ObjectInputStream.java
(readFields): Changed implementation of GetField.
(readClassDescriptor): Documented.
* java/io/ObjectOutputStream.java
(writeClassDescriptor): Added condition when to write class super
class information.
From-SVN: r74985
2003-12-22 Fernando Nasser <fnasser@redhat.com>
* gnu/java/awt/peer/gtk/GtkChoicePeer.java (postItemEvent): Rename to... (choicePostItemEvent): Change signature to more specific String object.
* java/awt/Choice.java (add): Generate ItemEvent for the first item
added.
(insert): Generate ItemEvent if insertion caused
selection to change.
(remove): Generate ItemEvent if removal cause selection to change.
(removeAll): Change algorithm to prevent generation of ItemEvents.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(connect_choice_item_selectable_hook): Change argument type.
Fix argument value.
Make sure resources are feed by registering callback.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Adjust call to the
above function.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Ditto.
(item_activate): Ditto.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Destroy removed
menuitem.
(item_removed): New function. Free resources.
* jni/gtk-peer/gtkpeer.h (item_event_hook_info): Change member type and
name.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
(Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit): Obtain MethodID for
choicePostItemEvent.
From-SVN: r74979
(selectThreadMutex): New field.
(selectThread): New field.
(unhandledWakeup): New field.
(implCloseSelector): Added skeleton code which
synchronizes as per Sun JRE JavaDoc.
(keys): Throw ClosedSelectorException if selector
is closed.
(selectNow): Added comment that we're faking out
an immediate select with a one-microsecond-timeout one.
(select): Use 0 instead of -1 for infinite timeout.
(implSelect): Changed comment in declaration.
(select): Added synchronized to method declaration.
Added synchronization and wakeup support as per Sun
JRE JavaDoc.
(selectedKeys): Throw ClosedSelectorException if selector
is closed.
(wakeup): Implemented.
(deregisterCancelledKeys): Synchronize on cancelled key
set before deregistering.
(register): Synchronize on key set before registering.
* java/nio/channels/spi/AbstractSelector.java
Added import for java.nio.channels.ClosedSelectorException.
(close): Added synchronized to method declaration.
(cancelledKeys): Throw ClosedSelectorException if selector
is closed.
(cancelKey): Synchronize on cancelled key set before key.
From-SVN: r74879
2003-12-20 Guilhem Lavaux <guilhem@kaffe.org>
* gnu/java/net/URLParseError.java: New file.
* gnu/java/net/protocol/jar/Handler.java
(parseURL): Throw URLParseError if needed, fix '/' handling.
* java/net/URL.java (URL): Catch URLParseError and
transform it into a MalformedURLException.
From-SVN: r74877
2003-12-19 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/FlowLayout.java (layoutContainer): Let components
assume their preferred height. Centre components vertically.
From-SVN: r74844
2003-12-19 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/ChannelInputStream.java: New file.
* java/nio/channels/Channels.java (newInputStream): Implemented.
* java/nio/channels/FileChannelImpl.java
(readImpl): Only put data into buffer if something was read.
* Makefile.am (ordinary_java_source_files):
Added gnu/java/nio/ChannelInputStream.java.
* Makefile.in: Regenerated.
From-SVN: r74842
2003-12-18 Fernando Nasser <fnasser@redhat.com>
* java/awt/List.java (replaceItem): Prevent selection to move with
replace and minimize flickering.
From-SVN: r74814
2003-12-18 Michael Koch <konqueror@gmx.de>
* mauve-libgcj: Removed the disabling of java.text.ACIAttribute and
java.text.CollationElementIterator tests as they compile again.
* testsuite/libjava.mauve/xfails: Added failing
java.text.CollationElementIterator tests.
From-SVN: r74796
2003-12-16 Fernando Nasser <fnasser@redhat.com>
* gnu/java/awt/peer/gtk/GtkContainerPeer.java (handleEvent): Check for
null Graphics pointer returned by FileDialogPeer.
From-SVN: r74744
* gnu/java/net/natPlainDatagramSocketImplWin32.cc:
Removed unused InterruptedIOException.h include.
* gnu/java/net/natPlainSocketImplWin32.cc
(connect): Reset and ignore our thread's interrupted
flag instead of testing and throwing an InterruptedIOException
if set.
(accept): Likewise + changed case of SocketTimeoutException
text.
(write): Likewise (for both overloads).
(doRead): Likewise.
From-SVN: r74716
(peekData): Throw SocketTimeoutException instead of
InterruptedIOException on timeout.
(receive): Likewise.
* gnu/java/net/natPlainSocketImplPosix.cc
(read): Made a minor exception text case change.
From-SVN: r74714
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Handle GtkButton widgets differently as events
go to its event_window.
(connect_awt_hook): Remove compiler warning.
From-SVN: r74704
* java/io/ObjectInputStream.java
(lookupClass): New method.
(currentLoader): New method.
(inputGetObjectStreamClasses): New method.
(assignNewHandle): Documented.
(currentClassLoader): Documented.
* java/io/ObjectStreamClass.java
(setClass): Changed API. Better handling of the imported/exported
fields.
(getSerialPersistentFields): Make it throw previously caught exceptions
so they can handled in setClass.
From-SVN: r74693
2003-12-16 Guilhem Lavaux <guilhem@kaffe.org>
* java/io/ObjectStreamField.java: A few methods were added in prevision
of the upcoming upgrade of the serialization code. This also adds
some missing documentation.
(ObjectStreamField): We should throw a NullPointerException when 'name'
is null.
From-SVN: r74690
2003-12-15 Graydon Hoare <graydon@redhat.com>
* jni/gtk-peer/gdkfont.h: New file.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Remove
include of cairo-xlib.h, add extra gdk_flush().
From-SVN: r74644
2003-12-12 Fernando Nasser <fnasser@redhat.com>
* jni/gtk-peer/gtkpeer.h: Extend NSA set of macros to handle a second
native state table -- native_global_ref_table.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Define
native_global_ref_table pointer.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(Java_gnu_java_awt_peer_gtk_GtkGenericPeer_dispose): Make sure JNI
global reference is deleted and memory allocated for pointer freed.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): Use saved
JNI global reference instead of JNI local reference.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Remove compilation warning.
(connect_awt_hook): Use saved JNI global reference instead of creating
a new one.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
(Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create): Save JNI global
reference to the Java object.
(Java_gnu_java_awt_peer_gtk_GtkButtonPeer_connectSignals): Remove
unused variable declaration and add comment.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c
(Java_gnu_java_awt_peer_gtk_GtkCanvasPeer_create): Save JNI global
reference to the Java object.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer.c
(Java_gnu_java_awt_peer_gtk_GtkCheckboxMenuItemPeer_create): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeCreate): Ditto.
(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_connectSignals): Use saved
JNI global reference instead of JNI local reference.
(item_toggled): Add debug statement.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_create): Save JNI global
reference to the Java object.
(connect_choice_item_selectable_hook): Use saved JNI global references
instead of JNI local reference.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c
(Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create): Save JNI
global reference to the Java object.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
(Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_create): Save JNI global
reference to the Java object.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
(Java_gnu_java_awt_peer_gtk_GtkLabelPeer_create): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c
(Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_create): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
(Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c
(Java_gnu_java_awt_peer_gtk_GtkScrollPanePeer_create): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
(Java_gnu_java_awt_peer_gtk_GtkTextAreaPeer_create): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
(Java_gnu_java_awt_peer_gtk_GtkTextFieldPeer_create): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
(Java_gnu_java_awt_peer_gtk_GtkListPeer_create): Ditto.
(Java_gnu_java_awt_peer_gtk_GtkListPeer_connectSignals): Use saved
JNI global reference instead of JNI local reference.
(item_selected): Add debug statement.
(item_unselected): Add debug statement.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
(Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create): Save JNI global
reference to the Java object.
Connect "activate" signal handler using global JNI reference.
(connect_activate_hook): Removed in favor of inline code.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c
(Java_gnu_java_awt_peer_gtk_GtkPanelPeer_create): Save JNI global
reference to the Java object.
(Java_gnu_java_awt_peer_gtk_GtkPanelPeer_connectSignals): Use saved
JNI global reference instead of JNI local reference. Add FIXME comment.
(Java_gnu_java_awt_peer_gtk_GtkPanelPeer_gtkPanelNew): Save JNI global
reference to the Java object. Add FIXME comment.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
(Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_create): Save JNI global
reference to the Java object.
(Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_connectSignals): Use saved
JNI global reference instead of JNI local reference.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
(Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_connectSignals): Use
saved JNI global reference instead of JNI local reference.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(Java_gnu_java_awt_peer_gtk_GtkWindowPeer_create): Save JNI global
reference to the Java object.
(Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals): Use saved
JNI global reference instead of JNI local reference.
From-SVN: r74593
(write): Removed diagnostic trace.
* gnu/java/nio/natSelectorImplPosix.cc: Added
includes for java.lang.Thread and java.io.InterruptedIOException.
(helper_put_filedescriptors): Don't put invalid file descriptors
in select set.
(helper_get_filedescriptors): Clear invalid file descriptors
from select set.
(helper_reset): New method for clearing our file descriptor
array.
(implSelect): Correctly calculate timeout if specified and
legal.
Intercept and deal with any java.io.InterruptedIOException
thrown by _Jv_select().
From-SVN: r74537
2003-12-08 Fernando Nasser <fnasser@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler):
Most coded moved to pre_event_handler, with the modifications
mentioned below.
(pre_event_handler): New function. Called on the Gtk "event" signal.
Do not retrieve the jobject from the window property as it is already
available as user data in the signal.
Do not try and find the grab widget as it is already done by Gtk at
this point.
Do not search for Window ancestor as Gtk already sends the signal to it. Do not meddle with the activation state of peer widgets on each
key press or release.
Add CList to the special handling when looking for the focused widget.
* jni/gtk-peer/gtkpeer.h: Add declaration for pre_event_handler.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c (connectJObject):
New function.
(connectSignals): New function.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c (connectHooks):
Rename to...
(connectSignals): New name. Get rid of NewGlobalRef call.
Use g_signal_connect instead of deprecated gtk_signal_connect.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(connect_choice_item_selectable_hook): Use g_signal_connect instead of
deprecated gtk_signal_connect.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
(Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
function.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
function.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_old_create): Remove dead
code.
(item_select): Remove indirection.
(item_unselect): Ditto.
(connect_selectable_hook): Folded into connectSignals.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectJObject): New
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
function.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c: Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks): Remove
function.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectSignals): New
function.
* gnu/java/awt/peer/gtk/GtkComponentPeer.java: Declare and call
connectJObject and connectSignals instead of connectHooks.
* gnu/java/awt/peer/gtk/GtkButtonPeer.java: Declare connectJObject and
connectSignals.
* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java: Declare connectSignals
and not connectHooks.
* gnu/java/awt/peer/gtk/GtkTextComponentPeer.java: Ditto.
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java: Declare connectJObject
and not connectHooks.
* gnu/java/awt/peer/gtk/GtkListPeer.java: Declare connectJObject and
connectSignals instead of connectHooks.
* gnu/java/awt/peer/gtk/GtkPanelPeer.java: Ditto.
* gnu/java/awt/peer/gtk/GtkScrollbarPeer.java: Ditto.
* gnu/java/awt/peer/gtk/GtkWindowPeer.java: Ditto.
From-SVN: r74536
* java/net/DatagramSocket.java
(close): Directly return if socket is closed.
* java/net/ServerSocket.java
(close): Directly return if socket is closed.
* java/net/Socket.java
(close): Directly return if socket is closed.
From-SVN: r74470
2003-12-08 Kim Ho <kho@redhat.com>
Fix for Checkbox states.
* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java:
(currentState): New field.
(nativeCreate): Add initial state parameter.
(create): Changed to reflect new parameter.
(setState): Fire only on changed states.
(postItemEvent): Fire only on changed states. Also change the
Java Checkbox to reflect new state.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c:
(nativeCreate): Add parameter and set active state.
From-SVN: r74459
2003-12-08 Fernando Nasser <fnasser@redhat.com>
* java/awt/datatransfer/StringSelection.java (getTransferData): Return
object of type expected by specified DataFlavor.
From-SVN: r74449
2003-12-08 Fernando Nasser <fnasser@redhat.com>
* java/awt/datatransfer/DataFlavor.java (getParameter): Fix off-by-one
error which was clipping off the first character of a parameter value.
From-SVN: r74448
* java/awt/Polygon.java
(translate): Fixed error that caused polygon
to move right/left when up/down translation was required.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c:
(getSelectionStart): Initialized start position to 0.
(getSelectionEnd): Initialized end position to 0.
(getCaretPosition): Initialized caret position to 0.
(getText): Initialized selected text to NULL
From-SVN: r74445
2003-12-08 Michael Koch <konqueror@gmx.de>
Fix for PR libgcj/13176.
* java/io/PrintStream.java: Partly revert my previous patches to get
(line_separator): New field.
(converter): New field.
(work): New field.
(work_bytes): New field.
(pw): Removed.
(closed): Removed.
(PrintStrean): Initialize converter and not pw.
(checkError): Flush always, pw doesn't exist anymore.
(close): Close underlying out stream.
(print): New method.
(writeChars): New method.
(print): Use new internal print method.
(println): Likewise.
From-SVN: r74419
* java/util/Hashtable.java (Hashtable(Map)): Use putAll, not
putAllInternal.
(putAllInternal): Correct comment.
* java/util/HashMap.java (HashMap(Map)): As above.
(putAllInternal): As above.
From-SVN: r74400
2003-12-05 Scott Gilbertson <scottg@mantatest.com>
* gnu/gcj/xlib/GC.java (updateClip): Added rectangles argument.
(clip): Removed field
(clipRectangles): New field.
(clone): Use new updateClip.
(setClipRectangles): Use new updateClip.
* gnu/gcj/xlib/natGC.cc (updateClip): Prepare passed rectangles.
From-SVN: r74348
* java/net/DatagramPacket.java
(length): Made packge-private to make it accessible via CNI.
(maxlen): New field.
(DatagramPacket): Cleaned up.
(setSocketAddress): Add message to exception.
(setData): Call other setData().
(setData): Call setLength().
(setLength): Initialize maxlen too.
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (peekData):
Get maximal length from maxlen field, set length field directly.
(receive): Likewise.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc (peekData):
Get maximal length from maxlen field, set length field directly.
(receive): Likewise.
From-SVN: r74278
PR java/12374:
* parse.y (qualify_ambiguous_name): Remove lots of broken
field access processing - there's no need to do that here,
because we have resolve_field_access. Remove
RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
* java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
used.
From-SVN: r74217
* configure.in: Added new MinGW-specific configure flag
--with-win32-nlsapi.
Added new AC_DEFINE MINGW_LIBGCJ_UNICODE.
Add -lunicows to MinGW SYSTEMSPEC if --with-win32-nlsapi
is set to unicows.
* configure: Rebuilt.
* include/config.h.in: Rebuilt.
* win32.cc (_Jv_Win32NewString): Implemented.
(nativeToUnicode): New helper function defined only for
non-UNICODE builds.
(unicodeToNative): Likewise.
(_Jv_Win32TempString): Implemented.
(lots): Refactored using tchar.h macros.
(WSAEventWrapper): Use _Jv_Win32NewString.
(_Jv_platform_initialize): Use GetModuleFileNameA instead
of GetModuleFileName.
(_Jv_platform_initProperties): Use _Jv_Win32NewString.
Use temporary stack buffer instead of a heap buffer.
* include/win32.h
Added defines for UNICODE and _UNICODE if MINGW_LIBGCJ_UNICODE is
defined; added tchar.h include.
(_Jv_Win32TempString): Declared new helper class.
(JV_TEMP_STRING_WIN32): New helper macro.
(_Jv_Win32NewString): Declared new helper method.
* java/io/natFileDescriptorWin32.cc (open): Use
JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING.
(write): Reformatted slightly.
* java/io/natFileWin32.cc (lots): Use tchar.h macros;
use JV_TEMP_STRING_WIN32 instead of JV_TEMP_UTF_STRING.
(getCanonicalPath): Use _Jv_Win32NewString instead of
JvNewStringUTF.
(performList): Likewise.
* java/lang/natWin32Process.cc (ChildProcessPipe):
Use tchar.h macros.
(startProcess): Use tchar.h macros, JV_TEMP_STRING_WIN32,
and UNICODE environment flag for CreateProcess.
* java/net/natNetworkInterfaceWin32.cc
(winsock2GetRealNetworkInterfaces): Use tchar.h macros and
_Jv_Win32NewString.
From-SVN: r74201
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontMetrics.c
(initState): Mark obj parameter as unused.
(stringWidth): Mark obj parameter as unused. Initialize
font_name properly.
From-SVN: r74198
2003-12-02 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java: Make
BufferedImageBuilder class static.
From-SVN: r74195