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
* 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-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 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
* 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
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-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
* 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
* 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
* 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
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-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
* 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