Imported GNU Classpath 0.92

2006-08-14  Mark Wielaard  <mark@klomp.org>

       Imported GNU Classpath 0.92
       * HACKING: Add more importing hints. Update automake version
       requirement.

       * configure.ac (gconf-peer): New enable AC argument.
       Add --disable-gconf-peer and --enable-default-preferences-peer
       to classpath configure when gconf is disabled.
       * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
       gnu/java/awt/dnd/peer/gtk to bc. Classify
       gnu/java/security/Configuration.java as generated source file.

       * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
       gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
       gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
       gnu/java/lang/management/VMThreadMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryMXBeanImpl.java,
       gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
       classes.
       * java/lang/management/VMManagementFactory.java: Likewise.
       * java/net/VMURLConnection.java: Likewise.
       * gnu/java/nio/VMChannel.java: Likewise.

       * java/lang/Thread.java (getState): Add stub implementation.
       * java/lang/Class.java (isEnum): Likewise.
       * java/lang/Class.h (isEnum): Likewise.

       * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.

       * javax/naming/spi/NamingManager.java: New override for StackWalker
       functionality.

       * configure, sources.am, Makefile.in, gcj/Makefile.in,
       include/Makefile.in, testsuite/Makefile.in: Regenerated.

From-SVN: r116139
This commit is contained in:
Mark Wielaard 2006-08-14 23:12:35 +00:00
parent abab460491
commit ac1ed908de
1294 changed files with 99479 additions and 35933 deletions

View file

@ -46,35 +46,30 @@ import java.security.MessageDigestSpi;
/**
* The implementation of a generic {@link java.security.MessageDigest} adapter
* class to wrap gnu.crypto hash instances.<p>
*
* This class defines the <i>Service Provider Interface</i> (<b>SPI</b>) for the
* {@link java.security.MessageDigest} class, which provides the functionality
* of a message digest algorithm, such as MD5 or SHA. Message digests are secure
* one-way hash functions that take arbitrary-sized data and output a fixed-
* length hash value.<p>
*
* All the abstract methods in the {@link java.security.MessageDigestSpi} class
* are implemented by this class and all its sub-classes.<p>
*
* class to wrap GNU hash instances.
* <p>
* This class defines the <i>Service Provider Interface</i> (<b>SPI</b>) for
* the {@link java.security.MessageDigest} class, which provides the
* functionality of a message digest algorithm, such as MD5 or SHA. Message
* digests are secure one-way hash functions that take arbitrary-sized data and
* output a fixed-length hash value.
* <p>
* All the abstract methods in the {@link MessageDigestSpi} class are
* implemented by this class and all its sub-classes.
* <p>
* All the implementations which subclass this object, and which are serviced by
* the GNU Crypto provider implement the {@link java.lang.Cloneable} interface.<p>
* the GNU provider implement the {@link Cloneable} interface.
*/
class MessageDigestAdapter extends MessageDigestSpi implements Cloneable
class MessageDigestAdapter
extends MessageDigestSpi
implements Cloneable
{
// Constants and variables
// -------------------------------------------------------------------------
/** Our underlying hash instance. */
private IMessageDigest adaptee;
// Constructor(s)
// -------------------------------------------------------------------------
/**
* Trivial protected constructor.
*
*
* @param mdName the canonical name of the hash algorithm.
*/
protected MessageDigestAdapter(String mdName)
@ -84,7 +79,7 @@ class MessageDigestAdapter extends MessageDigestSpi implements Cloneable
/**
* Private constructor for cloning purposes.
*
*
* @param adaptee a clone of the underlying hash algorithm instance.
*/
private MessageDigestAdapter(IMessageDigest adaptee)
@ -94,12 +89,6 @@ class MessageDigestAdapter extends MessageDigestSpi implements Cloneable
this.adaptee = adaptee;
}
// Class methods
// -------------------------------------------------------------------------
// java.security.MessageDigestSpi interface implementation
// -------------------------------------------------------------------------
public Object clone()
{
return new MessageDigestAdapter((IMessageDigest) adaptee.clone());
@ -130,9 +119,8 @@ class MessageDigestAdapter extends MessageDigestSpi implements Cloneable
{
int result = adaptee.hashSize();
if (len < result)
{
throw new DigestException();
}
throw new DigestException();
byte[] md = adaptee.digest();
System.arraycopy(md, 0, buf, offset, result);
return result;