Commit Graph

986 Commits

Author SHA1 Message Date
Julian Dolby
a828c3e105 Locale.java (toString): Improve efficiency if country and variant are both empty.
2002-11-27  Julian Dolby  <dolby@us.ibm.com>

	* java/util/Locale.java (toString): Improve efficiency if country
	and variant are both empty.

From-SVN: r59590
2002-11-27 22:41:07 +00:00
Andreas Tobler
32e098dd98 natPlainDatagramSocketImpl.cc (socklen_t): Don't define.
2002-11-26  Andreas Tobler  <a.tobler@schweiz.ch>

	* java/net/natPlainDatagramSocketImpl.cc (socklen_t): Don't
	define.
	* java/net/natPlainSocketImpl.cc (socklen_t): Don't define.
	* include/posix.h (socklen_t): Define if not already defined.

From-SVN: r59533
2002-11-26 20:09:28 +00:00
Mark Wielaard
cfc814d47e URL.java: Merge with Classpath (partly).
* java/net/URL.java: Merge with Classpath (partly).
	* java/net/URLStreamHandler: Merge with Classpath.

From-SVN: r59378
2002-11-22 16:48:52 +00:00
Michael Koch
6315b6cbff AsynchronousCloseException.java, [...]: New files.
2002-11-21  Michael Koch <konqueror@gmx.de>

	* java/nio/channels/AsynchronousCloseException.java,
	java/nio/channels/CancelledKeyException.java,
	java/nio/channels/ClosedByInterruptException.java,
	java/nio/channels/ConnectionPendingException.java,
	java/nio/channels/FileLockInterruptionException.java,
	java/nio/channels/IllegalSelectorException.java,
	java/nio/channels/NoConnectionPendingException.java,
	java/nio/channels/NonReadableChannelException.java,
	java/nio/channels/NonWritableChannelException.java,
	java/nio/channels/NotYetBoundException.java,
	java/nio/channels/NotYetConnectedException.java,
	java/nio/channels/OverlappingFileLockException.java,
	java/nio/channels/UnresolvedAddressException.java,
	java/nio/channels/UnsupportedAddressTypeException.java:
	New files.
	* Makefile.am (ordinary_java_source_files): Added new files.
	* Makefile.in: Regenerated.

From-SVN: r59341
2002-11-21 10:45:14 +00:00
Michael Koch
4033adc630 Forgot to add to cvs command line
From-SVN: r59340
2002-11-21 10:24:18 +00:00
Michael Koch
c3e0633cc3 2002-11-21 Michael Koch <konqueror@gmx.de>
* include/posix.h
       (_Jv_socket): New method.
       (_Jv_connect): New method.
       (_Jv_close): New method.
       (_Jv_platform_close_on_exec): Prefixed system function with "::".
       (_Jv_bind): New method.
       (_Jv_listen): New method.
       (_Jv_write): New method.
       (_Jv_read): New method.
       * include/win32.h
       (_Jv_socket): New method.
       (_Jv_connect): New method.
       (_Jv_close): New method.
       (_Jv_bind): New method.
       (_Jv_listen): New method.
       (_Jv_write): New method.
       (_Jv_read): New method.
       * java/net/natNetworkInterface.cc:
       Include platform.h, removed inclusion of socket.h
       (getRealNetworkInterfaces): Replaced ::socket() by _Jv_socket() and
       ::close() by _Jv_close().
       * java/net/natPlainDatagramSocketImpl.cc:
       Removed include of socket.h, definition of NATIVE_CLOSE and _Jv_bind,
       added some new lines to make code more readable.
       (create): Replaced ::socket() by _Jv_socket().
       (close): Replaced NATIVE_CLOSE() by _Jv_close().
       * java/net/natPlainSocketImpl.cc:
       Removed definition of NATIVE_CLOSE, _Jv_bind, Jv_connect and _Jv_accept,
       removed include of socket.h, removed some windows defines
       (now in include/win32.h).
       (create): Replaced ::socket() by _Jv_socket().
       (close): Replaced NATIVE_CLOSE() by _Jv_close().
       (write): Replaced ::read by _Jv_write().
       (read): Replaced ::read by _Jv_read().

From-SVN: r59338
2002-11-21 10:08:03 +00:00
Michael Koch
3ebb998e6f 2002-11-20 Michael Koch <konqueror@gmx.de>
* java/io/FileInputStream.java
	(getChannel): New method.
	* java/io/FileOutputStream.java
	(getChannel): New method.
	* java/net/ServerSocket.java
	(bind): Removed duplicate code and called another bind method instead.
	* java/nio/channels/SelectionKey.java
	(isValid): Removed wrong exception documentation.
	* java/nio/channels/ServerSocketChannel.java
	(accept): Added exception documentation.
	(open): Fixed typo, added exception documentation.
	* java/nio/channels/spi/AbstractSelectableChannel.java
	(implCloseChannel): Added exception documentation.
	(add): Reformated.
	(register): Added exception documentation.

From-SVN: r59307
2002-11-20 16:19:08 +00:00
Tom Tromey
da98b11a83 natReference.cc (add_to_hash): Look at copy', not referent'.
* java/lang/ref/natReference.cc (add_to_hash): Look at `copy', not
	`referent'.
	(finalize_referred_to_object): Don't modify `referent' or `copy'
	fields.
	(add_to_hash): Correctly set `n->next' when updating list.
	* java/lang/ref/Reference.java (enqueue): Return false if already
	enqueued.

From-SVN: r59278
2002-11-19 21:59:41 +00:00
Jesse Rosenstock
8c9aa0cba9 CoderResult.java (Cache.get): Fix a bug that was causing CoderResults to be cached...
2002-11-18  Jesse Rosenstock <jmr@ugcs.caltech.edu>

        * java/nio/charset/CoderResult.java (Cache.get): Fix a bug
        that was causing CoderResults to be cached, not WeakReferences
        to CoderResults.

From-SVN: r59233
2002-11-18 21:31:12 +00:00
Joerg Brunsmann
441c779913 KeyStore.java (getInstance): Fix comment and throw IllegalArgumentException if given provider is null.
2002-11-18  Joerg Brunsmann  <joerg_brunsmann@yahoo.de>

	* java/security/KeyStore.java (getInstance): Fix
	comment and throw IllegalArgumentException if
	given provider is null.
	(getInstance): New method for jdk1.4 compatibility.

From-SVN: r59226
2002-11-18 18:09:35 +00:00
Michael Koch
4f13d99ed3 PlainSocketImpl.java: Fix imports.
2002-11-18  Michael Koch <konqueror@gmx.de>

	* java/net/PlainSocketImpl.java: Fix imports.

From-SVN: r59221
2002-11-18 14:55:54 +00:00
Michael Koch
ecfef45b9a 2002-11-18 Michael Koch <konqueror@gmx.de>
* java/nio/channels/SelectionKey.java
	(isValid): Added exception documentation.
	* java/nio/channels/Selector.java
	(open): Declare "throws IOException".

From-SVN: r59219
2002-11-18 14:31:39 +00:00
Jesse Rosenstock
3386451d20 2002-11-17 Jesse Rosenstock <jmr@ugcs.caltech.edu>
* java/nio/charset/Charset.java
	(<clinit>): New method.
	(encode): Synchronize use of cached encoder object.
	(decode): Synchronize use of cached encoder object.

From-SVN: r59218
2002-11-18 14:15:16 +00:00
Michael Koch
48f5b6723a ByteBufferImpl.java, [...]: New files.
2002-11-18  Michael Koch <konqueror@gmx.de>

	* gnu/java/nio/ByteBufferImpl.java,
	gnu/java/nio/CharBufferImpl.java,
	gnu/java/nio/DatagramChannelImpl.java,
	gnu/java/nio/DoubleBufferImpl.java,
	gnu/java/nio/FileChannelImpl.java,
	gnu/java/nio/FloatBufferImpl.java,
	gnu/java/nio/IntBufferImpl.java,
	gnu/java/nio/LongBufferImpl.java,
	gnu/java/nio/PipeImpl.java,
	gnu/java/nio/SelectionKeyImpl.java,
	gnu/java/nio/SelectorImpl.java,
	gnu/java/nio/SelectorProviderImpl.java,
	gnu/java/nio/ServerSocketChannelImpl.java,
	gnu/java/nio/ShortBufferImpl.java,
	gnu/java/nio/SocketChannelImpl.java,
	java/nio/DoubleBuffer.java,
	java/nio/FloatBuffer.java,
	java/nio/IntBuffer.java,
	java/nio/LongBuffer.java,
	java/nio/ShortBuffer.java,
	java/nio/channels/FileChannel.java: New files.

From-SVN: r59216
2002-11-18 13:56:59 +00:00
Michael Koch
6602dd4a3b PlainSocketImpl.java: Reworked imports.
2002-11-18  Michael Koch <konqueror@gmx.de>

	* java/net/PlainSocketImpl.java: Reworked imports.
	* java/net/ServerSocket.java
	(ServerSocket): Create socket.
	* java/net/SocketAddress.java: Documentation added.
	* java/net/natPlainSocketImpl.cc: Reindented.
	* java/nio/ReadOnlyBufferException.java: New file
	* java/nio/channels/ClosedChannelException.java: Documentation added.
	* java/nio/channels/ClosedSelectorException.java: New file.

From-SVN: r59214
2002-11-18 13:22:55 +00:00
Mark Wielaard
b9ad851eef HttpURLConnection.java ((getPermission): Take port into consideration.
* java/net/HttpURLConnection.java ((getPermission): Take port
        into consideration.
        (getErrorStream): Implement.

From-SVN: r59196
2002-11-17 16:16:52 +00:00
Mark Wielaard
e0c34466ec * java/net/HttpURLConnection.java: Merge with GNU Classpath.
From-SVN: r59195
2002-11-17 15:47:27 +00:00
Mark Wielaard
b0fc58713d Integrate work by Raif S.
Integrate work by Raif S. Naffah (raif@fl.net.au)
	* java/security/DummyKeyPairGenerator.java (clone): New method.
	* java/security/DummyMessageDigest.java (clone): New method.
	(engineUpdate): Now public.
	(engineReset): Likewise.
	(engineDigest): Likewise.
	(engineGetDigestLength): New method.
	* java/security/DummySignature.java (clone): New method.
	* java/security/KeyPairGenerator.java (provider): Now package private.
	(getInstance(String)): Use getInstance(String,Provider).
	(getInstance(String,String): Use getInstance(String,Provider)
	(getInstance(String,Provider): New method.
	(getInstance(String,String,Provider): Don't cast DummyKeyPairGenerator.
	* java/security/KeyPairGeneratorSpi.java (clone): New method.
	* java/security/MessageDigest.java (provider): Now package private.
	(getInstance(String): Use getInstance(String,Provider).
	(getInstance(String,String): Use getInstance(String,Provider)
	(getInstance(String,Provider): New method.
	* java/security/Provider.java (toCanonicalKey): New method.
	(get): New method that uses toCanonicalKey().
	(put): Use toCanonicalKey().
	(remove): Likewise.
	* java/security/Security.java (insertProviderAt): Provider index is one
	based, not zero based.
	(addProvider): Likewise.
	(removeProvider): Likewise.
	* java/security/Signature.java (provider): Now package private.
	(getInstance(String)): Use getInstance(String,Provider).
	(getInstance(String,String): Use getInstance(String,Provider)
	(getInstance(String,Provider): New method.
	(getInstance(String,String,Provider): Don't cast DummySignature.

From-SVN: r59179
2002-11-17 00:10:24 +00:00
Tom Tromey
401d536248 For PR libgcj/8593:
* java/util/zip/GZIPInputStream.java (read): Check file size.
	Look in inflater for remaining input bytes.
	(read4): Added buf and offset arguments.

From-SVN: r59145
2002-11-16 00:41:32 +00:00
Eric Blake
a902a2dee7 AppletContext.java: Fix typo and remove redundant modifiers.
2002-11-12  Eric Blake  <ebb9@email.byu.edu>

	* java/applet/AppletContext.java: Fix typo and remove redundant
	modifiers.

From-SVN: r59112
2002-11-14 20:35:27 +00:00
Tom Tromey
06fa6442a3 natRuntime.cc (insertSystemProperties): Set gnu.classpath.home.
* java/lang/natRuntime.cc (insertSystemProperties): Set
	gnu.classpath.home.

From-SVN: r59108
2002-11-14 18:28:07 +00:00
Michael Koch
61d318260a 2002-11-13 Michael Koch <konqueror@gmx.de>
* java/nio/ByteBuffer.java
	(allocate): New method.
	(wrap): New method.
	(put): New method.
	(get): New method.

From-SVN: r59082
2002-11-13 18:43:20 +00:00
Michael Koch
70c73a4d1d AlreadyConnectedException.java: Removed unneeded import.
2002-11-13  Michael Koch <konqueror@gmx.de>

	* java/nio/channels/AlreadyConnectedException.java:
	Removed unneeded import.
	(AlreadyConnectedException): Documentation added.
	* java/nio/channels/Pipe.java
	(SinkChannel.SinkChannel): Documentation added.
	(SinkChannel.validOps): New method.
	(SourceChannel.SourceChannel): Documentation added.
	(SourceChannel.validOps): New method.
	(Pipe): Documentation added.
	(open): Documentation added.
	(SinkChannel.channel): Documentation added.
	(SourceChannel.channel): Documentation added.
	* java/nio/channel/SelectableChannel.java
	(SelectableChannel): Documentation added.
	(blockingLock): Documentation added.
	(configureBlocking):Documentation added.
	(isBlocking):Documentation added.
	(isRegistered):Documentation added.
	(keyFor):Documentation added.
	(provider):Documentation added.
	(register): Documentation added.
	(validOps): Documentation added.
	* jaba/nio/channels/SelectionKey.java
	(SelectionKey): Documentation added.
	(attach): Documentation added.
	(attachment): Documentation added.
	(isAcceptable): Documentation added.
	(isConnetable): Documentation added.
	(isReadable): Documentation added.
	(isWritable): Documentation added.
	(cancel): Documentation added.
	(channel): Documentation added.
	(interestOps): Documentation added.
	(isValid): Documentation added.
	(readyOps): Documentation added.
	(selector): Documentation added.
	* jaba/nio/channels/Selector.java
	(Selector): Documentation added.
	(open): Documentation added.
	(close): Documentation added.
	(isOpen): Documentation added.
	(keys): Documentation added.
	(provider): Documentation added.
	(select): Documentation added.
	(selectedKeys): Documentation added.
	(selectNow): Documentation added.
	(wakeup): Documentation added.
	* java/nio/channels/spi/AbstractInterruptibleChannel.java
	(AbstractInterruptibleChannel): Documentation added.
	(opened): Default to true;
	(begin): Documentation added.
	(close): Set opened to false, documentation added.
	(isOpen): Documentation added.
	* java/nio/channels/spi/AbstractSelectionKey.java
	(AbstractSelectionKey): Documentation added.
	(cancel): Documentation added.
	(isValid): Documentation added.
	* java/nio/channels/spi/AbstractSelector.java
	(AbstractSelector): Documentation added.
	(begin): Documentation added.
	(close): Documentation added.
	(isOpen): Documentation added.
	(deregister): Documentation added.
	(end): Documentation added.
	(provider): Documentation added.
	(implCloseSelector): Documentation added.
	(register): Documentation added.
	* java/nio/channels/spi/SelectorProvider.java
	(SelectorProvider): Documentation added.
	(openDatagramChannel): Documentation added.
	(openPipe): Documentation added.
	(openSelector): Documentation added.
	(openServerSocketChannel): Documentation added.
	(openSocketChannel): Documentation added.
	(provider): Documentation added.

From-SVN: r59077
2002-11-13 13:52:47 +00:00
Michael Koch
93f93f9f28 Buffer.java: Implemented.
2002-11-13  Michael Koch <konqueror@gmx.de>

	* java/nio/Buffer.java: Implemented.
	* java/nio/CharBuffer.java: New file.
	* java/nio/InvalidMarkException.java: New file.
	* java/nio/channels/DatagramChannel.java: Implemented.
	* java/nio/channels/ServerSocketChannel.java: Implemented.
	* java/nio/channels/SocketChannel.java: Implemented.
	* java/nio/channels/spi/AbstractChannel.java: Removed.
	* java/nio/channels/spi/AbstractSelectableChannel.java:
	Implemented.
	* java/nio/charset/Charset.java:
	Merge from Classpath.
	* java/nio/charset/CharsetDecoder.java: New file.
	* java/nio/charset/CharsetEncoder.java: New file.
	* java/nio/charset/CoderResult.java: New file.
	* Makefile.am (ordinary_java_source_files): Added new files.
	* Makefile.in: Regenerated.

From-SVN: r59075
2002-11-13 12:21:26 +00:00
Michael Koch
ac7bc6bb2f CharacterCodingException.java: This class must be public.
2002-11-11  Michael Koch <konqueror@gmx.de>

	* java/nio/charset/CharacterCodingException.java:
	This class must be public.
	* java/nio/charset/CoderMalfunctionError.java:
	This class must be public.
	* java/nio/charset/CodingErrorAction.java:
	This class must be public.
	* java/nio/charset/IllegalCharsetNameException.java:
	This class must be public, better implementation.
	* java/nio/charset/MalformedInputException.java:
	This class must be public, better implementation.
	* java/nio/charset/UnmappableCharacterException.java:
	This class must be public, better implementation.
	* java/nio/charset/UnsupportedCharsetException.java:
	This class must be public, better implementation.

From-SVN: r59012
2002-11-11 07:12:07 +00:00
Michael Koch
dba90b0cc6 BufferOverflowException.java, [...]: New file.
2002-11-11  Michael Koch <konqueror@gmx.de>

	* java/nio/BufferOverflowException.java,
	java/nio/BufferUnderflowException.java: New file.
	* Makefile.am (ordinary_java_source_files):
	Added new files.
	* Makefile.in: Regenerated.

From-SVN: r59011
2002-11-11 07:00:29 +00:00
Tom Tromey
459c4c517e Container.java (validate): Use tree lock.
* java/awt/Container.java (validate): Use tree lock.
	(getComponent): Likewise.
	(getComponents): Likewise.
	(addImpl): Likewise.
	(remove): Likewise.
	(removeAll): Likewise.
	(processEvent): Fixed indentation.
	(getComponentAt): Use tree lock.
	(findComponentAt): Likewise.
	(removeNotify): Likewise.
	(isAncestorOf): Likewise.
	(list): Likewise.
	(visitChildren): Likewise.
	(findNextFocusComponent): Likewise.
	(addNotifyContainerChildren): Likewise.
	(getAccessibleChildrenCount): Likewise.
	(getAccessibleChild): Likewise.

From-SVN: r59009
2002-11-11 06:33:08 +00:00
Tom Tromey
924af605fe GridLayout.java (layoutContainer): Use tree lock.
* java/awt/GridLayout.java (layoutContainer): Use tree lock.
	(getSize): Likewise.
	* java/awt/FlowLayout.java (layoutContainer): Use tree lock.
	(getSize): Likewise.
	* java/awt/BorderLayout.java (layoutContainer): Use tree lock.
	(calcSize): Likewise.
	* java/awt/CardLayout.java (getSize): Use tree lock.
	(gotoComponent): Likewise.
	(layoutContainer): Likewise.

From-SVN: r58998
2002-11-10 23:11:21 +00:00
Tom Tromey
a6b5bd3b6b natFileDescriptorWin32.cc (read): Handle case where count is 0.
* java/io/natFileDescriptorWin32.cc (read): Handle case where
	count is 0.
	* java/io/natFileDescriptorPosix.cc (read): Handle case where
	count is 0.

From-SVN: r58997
2002-11-10 22:23:53 +00:00
Tom Tromey
f18590c620 Externalizable.java, [...]: New versions from Classpath.
* java/io/Externalizable.java, java/io/FilePermission.java,
	java/io/ObjectStreamConstants.java, java/io/Serializable.java,
	java/io/SerializablePermission.java, java/text/Format.java,
	java/util/AbstractMap.java, java/util/HashMap.java,
	java/util/LinkedHashMap.java, javax/naming/BinaryRefAddr.java: New
	versions from Classpath.

From-SVN: r58996
2002-11-10 22:06:49 +00:00
Anthony Green
1323d7a92b Attributes.java (Name): Fix name check.
2002-11-10  Anthony Green  <green@redhat.com>

	* java/util/jar/Attributes.java (Name): Fix name check.

From-SVN: r58992
2002-11-10 21:13:44 +00:00
Mark Wielaard
c0cd8f67f1 natClass.cc (initializeClass): Throw NoClassDefFoundError with getName() as message.
* java/lang/natClass.cc (initializeClass): Throw NoClassDefFoundError
	with getName() as message.
	(_Jv_CheckArrayStore): Throw ArrayStoreException with object and array
	type as message.

	* java/lang/natVMThrowable.cc: Don't declare parameter t, it is
	unused.

From-SVN: r58991
2002-11-10 21:07:27 +00:00
Tom Tromey
44e8d1f006 GridLayout.java (setColumns): Check newCols, not cols.
* java/awt/GridLayout.java (setColumns): Check newCols, not cols.
	(setRows): Check newRows, not rows.

From-SVN: r58984
2002-11-10 17:35:13 +00:00
Tom Tromey
f7aa343f42 Applet.java, [...]: New versions from Classpath.
* java/applet/Applet.java, java/applet/AppletContext.java,
	java/applet/AppletStub.java, java/applet/AudioClip.java,
	java/awt/CardLayout.java,
	java/awt/ContainerOrderFocusTraversalPolicy.java,
	java/awt/Cursor.java, java/awt/Event.java, java/awt/Frame.java,
	java/awt/GridBagConstraints.java, java/awt/GridBagLayout.java,
	java/awt/GridLayout.java, java/awt/color/ColorSpace.java,
	java/awt/color/ICC_ColorSpace.java,
	java/awt/color/ICC_Profile.java,
	java/awt/color/ICC_ProfileGray.java,
	java/awt/color/ICC_ProfileRGB.java,
	java/awt/datatransfer/DataFlavor.java,
	java/awt/dnd/DragSourceContext.java, java/awt/dnd/DropTarget.java,
	java/awt/dnd/DropTargetContext.java, java/awt/event/KeyEvent.java:
	New versions from Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added ICC_ProfileGray and
	ICC_ProfileRGB.

From-SVN: r58964
2002-11-10 00:16:43 +00:00
Tom Tromey
adf94cac56 ScrollPane.java (ScrollPane): Fixed test for valid display policy.
* java/awt/ScrollPane.java (ScrollPane): Fixed test for valid
	display policy.

From-SVN: r58963
2002-11-09 23:42:01 +00:00
Tom Tromey
ad980a7b82 List.java (processEvent): Added missing `else's.
* java/awt/List.java (processEvent): Added missing `else's.

	* java/awt/Window.java (show): validate() before showing.  Make
	parent displayable.
	(isDisplayable): New method.

From-SVN: r58961
2002-11-09 23:23:32 +00:00
Mark Wielaard
f150fe3fa7 backport: MarshalledObject.java (equals): Check hashcode first.
Merge Orp RMI patches from Wu Gansha <gansha.wu@intel.com>
	* java/rmi/MarshalledObject.java (equals): Check hashcode first.

	* java/rmi/server/RMIClassLoader.java (MyClassLoader): Create/Use
	annotation.
	(loadClass): Take String as codebases.
	(getClassAnnotation): Use MyClassLoader annotations.
	* java/rmi/server/UnicastRemoteObject.java (UnicastRemoteObject):
	call exportObject(this).

	* gnu/java/rmi/RMIMarshalledObjectOutputStream.java
	(RMIMarshalledObjectOutputStream): set locBytesStream and locStream.
	(setAnnotation): Don't set locBytesStream and locStream.
	(replaceObject): Removed.
	(flush): Don't test locStream.
	(getLocBytes): LikeWise.
	* gnu/java/rmi/dgc/DGCImpl.java: extends UnicastServerRef.
	(leaseCache): New field.
	(dirty): Use leaseCache.
	(LeaseRecord): New inner class.
	* gnu/java/rmi/registry/RegistryImpl.java (RegistryImpl): Don't
	explicitly call exportObject().
	* gnu/java/rmi/registry/RegistryImpl_Stub.java: set useNewInvoke to
	false to communicate with Sun JDK130.
	* gnu/java/rmi/server/ConnectionRunnerPool.java: Add CPU comment.
	* gnu/java/rmi/server/RMIObjectInputStream.java
	(UnicastConnectionManager): Removed field.
	* gnu/java/rmi/server/RMIObjectOutputStream.java (replaceObject):
	Use UnicastServer.getExportedRef().
	* gnu/java/rmi/server/UnicastConnection.java (reviveTime): New field.
	(expireTime): Likewise.
	(CONNECTION_TIMEOUT): Likewise.
	(disconnect): Call sock.close().
	(isExpired): New method.
	(resetTime): Likewise.
	(run): Use do while loop and catch Exception for discardConnection().
	* gnu/java/rmi/server/UnicastConnectionManager.java: Pool connections.
	* gnu/java/rmi/server/UnicastRef.java: Lots of changes.
	* gnu/java/rmi/server/UnicastRemoteCall.java: Lots of changes.
	* gnu/java/rmi/server/UnicastServer.java (refcache): New field.
	(exportObject): Use refcache.
	(unexportObject): Likewise.
	(getExportedRef): New method.
	* gnu/java/rmi/server/UnicastServerRef.java (UnicastServerRef): New
	constructor.
	(exportObject): Save manager.serverobj.
	(getStub): New method.

From-SVN: r58900
2002-11-07 18:01:05 +00:00
Mark Wielaard
396a80436c natField.cc (getBoolean): Use getType().
* java/lang/reflect/natField.cc (getBoolean): Use getType().
	(getByte): Likewise.
	(getShort): Likewise.
	(getInt): Likewise.
	(getLong): Likewise.
	(getFloat): Likewise.
	(getDouble): Likewise.
	(get): Likewise.
	(setChar): Likewise.
	(setByte): Likewise.
	(setShort): Likewise.
	(setInt): Likewise.
	(setLong): Likewise.
	(setFloat): Likewise.
	(setDouble): Likewise.

From-SVN: r58899
2002-11-07 17:57:09 +00:00
Michael Koch
82396c2a26 Choice.java, [...]: Fixed documentation.
2002-11-07  Michael Koch <konqueror@gmx.de>

	* java/awt/Choice.java,
	java/awt/Container.java,
	java/awt/GridBagLayout.java:
	Fixed documentation.
	* java/awt/peer/ContainerPeer.java:
	Reindented.

From-SVN: r58888
2002-11-07 13:01:34 +00:00
Michael Koch
3bb5c7a169 ICC_Profile.java: Added missing constants.
2002-11-07  Michael Koch <konqueror@gmx.de>

	* java/awt/color/ICC_Profile.java:
	Added missing constants.
	* java/awt/color/ICC_ColorSpace.java
	(getMinValue): Added dummy implementation.
	(getMaxValue): Added dummy implementation.
	* java/awt/datatransfer/DataFlavor.java
	(imageFlavor): Added.
	(isMimeTypeEqual): Must be final.
	(getDefaultRepresentationClass): Must be non-static.
	(getDefaultRepresentationClassAsString): Must be non-static.
	* java/awt/dnd/DragSourceContext.java
	(dragExit): Corrected argument.
	(dragDropEnd): Corrected argument.
	* java/awt/dnd/DragSourceListener.java.java
	(dragExit): Corrected argument.
	(dragDropEnd): Corrected argument.
	* java/awt/font/TextHitInfo.java
	(toString): Added stubbed implementation.
	* java/awt/geom/PathIterator.java:
	The constants must be static.
	* java/awt/image/VolatileImage.java
	(IMAGE_INCOMPATIBLE): Fixed typo.
	* java/awt/image/renderable/RenderableImage.java
	(HINTS_OBSERVED): Must be static.
	* java/beans/BeanInfo.java:
	Constants must be final.

From-SVN: r58885
2002-11-07 08:45:19 +00:00
Tom Tromey
12f256d42e re PR libgcj/8481 (java.Random.nextInt(int) may return negative)
From svens@it.uu.se.  For PR libgcj/8481.
	* java/util/Random.java (nextInt(int)): Only use 31 bits.

From-SVN: r58876
2002-11-07 04:38:21 +00:00
Tom Tromey
957e3aef4c ClassLoader.java (loadClass): Call loadClass on VMClassLoader, not findClass.
* java/lang/ClassLoader.java (loadClass): Call loadClass on
	VMClassLoader, not findClass.

From-SVN: r58786
2002-11-04 06:17:55 +00:00
Jeff Sturm
a5db0683cb resolve.cc (METHOD_NOT_THERE, [...]): Remove.
* resolve.cc (METHOD_NOT_THERE, METHOD_INACCESSIBLE): Remove.
	(_Jv_ResolvePoolEntry): Use _Jv_Method.index, not
	_Jv_DetermineVTableIndex, to determine vtable offset.
	(_Jv_DetermineVTableIndex): Remove.
	(_Jv_PrepareClass): Don't layout vtable.  Use _Jv_MakeVTable instead.

	* java/lang/Class.h (friend int _Jv_DetermineVTableIndex): Remove.

From-SVN: r58780
2002-11-04 02:45:31 +00:00
Tom Tromey
7189ea2902 AlreadyConnectedException.java: Extend IllegalStateException, per spec.
* java/nio/channels/AlreadyConnectedException.java: Extend
	IllegalStateException, per spec.

From-SVN: r58773
2002-11-03 21:18:32 +00:00
Mark Wielaard
de36f65dd1 GNU Classpath merge.
2002-10-31  Stephen Crawley  <crawley@dstc.edu.au>

	* java/lang/Double.java (valueOf): Return new Double(parseDouble(s)).

2002-10-31  Wu Gansha <gansha.wu@intel.com>:

        * java/util/ArrayList.java (readObject, writeObject): Only read/write
        size items.

2002-10-31  Wu Gansha <gansha.wu@intel.com>:

        * java/io/DataInputStream.java (convertFromUTF): Give StringBuffer an
        initial estimated size to avoid enlarge buffer frequently.

2002-10-31  Wu Gansha <gansha.wu@intel.com>:

	* java/lang/reflect/Proxy.java (ProxyType): Set loader to System
	ClassLoader when null.
	(ProxyType.hashCode): Loader null check no longer needed.
	(ProxyType.sameTypes): New method.
	(ProxyType.equals): Use new method.

2002-10-31  Mark Wielaard  <mark@klomp.org>

        * java/net/URLDecoder.java (decode): Initialize Stringbuffer size to
	length of String.
	* java/net/URLEncoder.java (encode): Likewise.

2002-10-31  Mark Wielaard  <mark@klomp.org>

	* java/util/zip/ZipInputStream.java (getNextEntry): Throw IOException
	when stream is closed.
	(closeEntry): Likewise.
	(read): Likewise.
	* java/util/zip/ZipOutputStream.java (putNextEntry): Throw
	ZipException when no entry active.
	(closeEntry): Likewise.
	(write): Likewise.

From-SVN: r58772
2002-11-03 20:27:31 +00:00
Tom Tromey
afa54b4c09 Class.h: Move JV_STATE_ERROR before JV_STATE_DONE.
* java/lang/Class.h: Move JV_STATE_ERROR before JV_STATE_DONE.
	* java/lang/natClass.cc (initializeClass): Don't return just
	because self==thread.

From-SVN: r58763
2002-11-02 23:52:56 +00:00
Tom Tromey
fead5eb589 For PR java/8415:
* java/lang/reflect/natMethod.cc (getType): Use _Jv_FindClass.
	* prims.cc (_Jv_FindClassFromSignature): Indentation fix.

From-SVN: r58757
2002-11-02 21:33:30 +00:00
Michael Koch
9dcb1ec813 ByteOrder.java: New file.
2002-11-01  Michael Koch  <konqueror@gmx.de>

	* java/nio/ByteOrder.java: New file.
	* java/nio/channels/DatagramChannel.java:
	(DatagramChannel): New constructor.
	* java/nio/channels/Pipe.java: New file.
	* java/nio/channels/SelectableChannel.java: New file.
	* java/nio/channels/SelectionKey.java: New file.
	* java/nio/channels/Selector.java: New file.
	* java/nio/channels/ServerSocketChannel.java
	(ServerSocketChannel): New constructor.
	* java/nio/channels/SocketChannel.java
	(SocketChannel): New constructor.
	* java/nio/channels/Pipe.java: New file.
	* java/nio/channels/spi/AbstractChannel.java: New file.
	* java/nio/channels/spi/AbstractInterruptibleChannel.java: New file.
	* java/nio/channels/spi/AbstractSelectableChannel.java:
	License added
	(AbstractSelectableChannel): New stubbed method.
	* java/nio/channels/spi/AbstractSelectionKey.java: New file.
	* java/nio/channels/spi/AbstractSelector.java: New file.
	* java/nio/channels/spi/SelectorProvider.java: New file.
	* java/nio/charset/Charset.java: New file.
	* java/nio/charset/CoderMalfunctionError.java: New file.
	* java/nio/charset/CodingErrorAction.java: New file.
	* java/nio/charset/spi/CharsetProvider.java
	(charsetForName): Uncommented.
	* Makefile.am (java_native_source_files): Added new files.
	* Makefile.in: Regenerated.

From-SVN: r58713
2002-11-01 12:03:40 +00:00
Michael Koch
75fe3383d8 2002-11-01 Michael Koch <konqueror@gmx.de>
* java/net/InetAddress.java:
	(isAnyLocalAddress): Implemented.
	(isLoopbackAddress): Implemented, comment added.
	(isLinkLocalAddress): Implemented, documentation added.
	(isSiteLocalAddress): Implemented, documentation added.
	(isMCGlobal): Implemented, documentation added.
	(isMCNodeLocal): Implemented, documentation added.
	(isMCLinkLocal): Implemented, documentation added.
	(isMCSiteLocal): Implemented, documentation added.
	(isMCOrgLocal): Implemented, documentation added.
	(getHostName): Documentation added.
	(getCanonicalHostName): Implemented, documentation added.
	(getAddress): Documentation added.
	(hashCode): Documentation added.
	(equals): Documentation added.
	(toString): Fixed implementation.
	(getByAddress): Use Inet4Address and Inet6Address.
	(lookup): New linewrap.
	(getByName): SecurityManager check added, support Inet4Address and
	Inet6address, comments added.
	(getAllByName): SecurityManager check added, comments added.
	* java/net/Inet6Address.java:
	(Inet6Address): Initialize parent class with addr instead of null.
	* java/net/URL.java
	(equals): Documentation added.
	(getFile): Documentation added.
	(hashCode): Documentation added.
	* java/net/natInetAddress.cc:
	(aton): Fix IPv6 support.
	* java/net/natPlainDatagramSocketImpl.cc:
	(peek): Throw PortUnreachableException when suitable.
	(peekData): Throw PortUnreachableException when suitable.
	(send): Throw PortUnreachableException when suitable.
	(receive): Throw PortUnreachableException when suitable.

From-SVN: r58704
2002-11-01 06:35:14 +00:00
Mark Wielaard
5e81d5beff ZipFile.java (readLeShort): Take and use DataInput as argument.
* java/util/zip/ZipFile.java (readLeShort): Take and use DataInput as
	argument.
	(readLeShort): Likewise and use byte[].
	(readLeInt): Likewise.
	(readEntries): Use new versions of methods and use byte[] for reading
	a complete zip entry. Add ZipFile name to exceptions.
	(entries): Add ZipFile name to exceptions.
	(getEntry): Likewise.
	(checkLocalHeader): Use new versions of methods and add ZipFile name
	to exceptions.

From-SVN: r58697
2002-10-31 21:56:32 +00:00