+2004-11-18 Jeroen Frijters <address@bogus.example.com>
+
+ * java/lang/StackTraceElement.java: Made final.
+ * java/nio/channels/Channels.java: Added private constructor.
+ * java/rmi/Naming.java: Added private constructor.
+ * java/rmi/registry/LocateRegistry.java: Added private constructor.
+ * java/rmi/server/RMIClassLoader.java: Added private constructor.
+ * java/security/KeyPairGeneratorSpi.java
+ (clone): Made protected and simplified implementation.
+ * java/text/DateFormat.java
+ (allFields): Made package accessible.
+ * java/text/DecimalFormat.java
+ (formatInternal): Made private.
+ * java/text/Format.java
+ (formatInternal): Made private.
+ * java/util/logging/Handler.java: Made constructor protected.
+ * java/util/regex/Matcher.java: Made final.
+ * java/util/regex/Pattern.java: Made final.
+ * javax/crypto/CipherInputStream.java
+ (mark): Corrected mark parameter type (from long to int).
+ * javax/crypto/ExemptionMechanism.java
+ (finalize): Added.
+ * javax/crypto/Mac.java
+ (getMacLength): Made final.
+ (clone): Made final.
+ * javax/imageio/ImageIO.java: Added private constructor.
+ * javax/imageio/stream/ImageInputStreamImpl.java
+ (checkClosed): Made final.
+ * javax/net/ssl/SSLPermission.java: Made final.
+ * javax/print/DocFlavor.java
+ (hostEncoding): Added work-around to prevent the field from being
+ a compile time constant.
+ * javax/print/attribute/AttributeSetUtilities.java: Added private
+ constructor.
+ (UnmodifiableDocAttributeSet): Made private.
+ (UnmodifiablePrintJobAttributeSet): Made private.
+ (UnmodifiablePrintRequestAttributeSet): Made private.
+ (UnmodifiablePrintServiceAttributeSet): Made private.
+ (SynchronizedAttributeSet): Made private.
+ (SynchronizedDocAttributeSet): Made private.
+ (SynchronizedPrintJobAttributeSet): Made private.
+ (SynchronizedPrintRequestAttributeSet): Made private.
+ (SynchronizedPrintServiceAttributeSet): Made private.
+ * javax/security/auth/PrivateCredentialPermission.java: Made final.
+
2004-11-18 Craig Black <craig.black@aonix.com>
* gnu/java/beans/BeanInfoEmbryo.java: Use TreeMap for proper sorting.
* @since 1.4
* @status updated to 1.4
*/
-public class StackTraceElement implements Serializable
+public final class StackTraceElement implements Serializable
{
/**
* Compatible with JDK 1.4+.
*/
public final class Channels
{
+ /**
+ * This class isn't intended to be instantiated.
+ */
+ private Channels() {}
+
/**
* Constructs a stream that reads bytes from the given channel.
*/
import java.rmi.registry.Registry;
public final class Naming {
+ /**
+ * This class isn't intended to be instantiated.
+ */
+ private Naming() {}
/**
* Looks for the remote object that is associated with the named service.
import java.rmi.server.RemoteRef;
public final class LocateRegistry {
+ /**
+ * This class isn't intended to be instantiated.
+ */
+ private LocateRegistry() {}
public static Registry getRegistry() throws RemoteException {
return (getRegistry("localhost", Registry.REGISTRY_PORT));
*/
public class RMIClassLoader
{
+ /**
+ * This class isn't intended to be instantiated.
+ */
+ private RMIClassLoader() {}
+
private static class MyClassLoader extends URLClassLoader
{
// Package-private to avoid a trampoline constructor.
public abstract KeyPair generateKeyPair();
/**
- Returns a clone of this class.
-
- If cloning is not supported, then by default the class throws a
- CloneNotSupportedException. The MessageDigestSpi provider
- implementation has to overload this class in order to be
- cloneable.
+ * We override clone here to make it accessible for use by
+ * DummyKeyPairGenerator.
*/
- public Object clone() throws CloneNotSupportedException
+ protected Object clone() throws CloneNotSupportedException
{
- if (this instanceof Cloneable)
- return super.clone();
- else
- throw new CloneNotSupportedException();
+ return super.clone();
}
}
public static final DateFormat.Field TIME_ZONE
= new Field("timezone", Calendar.ZONE_OFFSET);
- public static final DateFormat.Field[] allFields =
+ static final DateFormat.Field[] allFields =
{
ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY1,
HOUR_OF_DAY0, MINUTE, SECOND, MILLISECOND,
&& useExponentialNotation == dup.useExponentialNotation);
}
- protected void formatInternal (double number, FormatBuffer dest,
- FieldPosition fieldPos)
+ private void formatInternal (double number, FormatBuffer dest,
+ FieldPosition fieldPos)
{
// A very special case.
if (Double.isNaN(number))
{
static final long serialVersionUID = 276966692217360283L;
- public Field(String name)
+ protected Field(String name)
{
super(name);
}
* supposed to provide a Formatter, but this is what the specification
* says.
*/
+ protected Handler()
{
level = Level.ALL;
}
*
* @since 1.4
*/
-public class Matcher
+public final class Matcher
{
private Pattern pattern;
private CharSequence input;
*
* @since 1.4
*/
-public class Pattern implements Serializable
+public final class Pattern implements Serializable
{
private static final long serialVersionUID = 5073258162644648461L;
*
* @param mark Is ignored.
*/
- public void mark(long mark)
+ public void mark(int mark)
{
}
{
return true;
}
+
+ protected void finalize()
+ {
+ }
}
*
* @return The MAC length.
*/
- public int getMacLength()
+ public final int getMacLength()
{
return macSpi.engineGetMacLength();
}
* @throws java.lang.CloneNotSupportedException If the underlying
* implementation is not cloneable.
*/
- public Object clone() throws CloneNotSupportedException
+ public final Object clone() throws CloneNotSupportedException
{
Mac result = new Mac((MacSpi) macSpi.clone(), provider, algorithm);
result.virgin = virgin;
public final class ImageIO
{
+ /**
+ * This class isn't intended to be instantiated.
+ */
+ private ImageIO() {}
+
private static final class ReaderFormatFilter implements ServiceRegistry.Filter
{
private String formatName;
// Do nothing here.
}
- protected void checkClosed()
+ protected final void checkClosed()
throws IOException
{
if (closed)
/**
* A permission used for accessing SSL classes.
*/
-public class SSLPermission extends BasicPermission
+public final class SSLPermission extends BasicPermission
{
// Constant.
private static final long serialVersionUID = -4512080796965449721L;
- public static final String hostEncoding = "US-ASCII";
+ // FIXME: Get the host encoding from somewhere. Note that the new String is to make
+ // sure the field won't be a compile time constant.
+ public static final String hostEncoding = new String("US-ASCII");
private String mediaSubtype;
private String mediaType;
public final class AttributeSetUtilities
{
+ /**
+ * This class isn't intended to be instantiated.
+ */
+ private AttributeSetUtilities() {}
+
private static class UnmodifiableAttributeSet
implements AttributeSet, Serializable
{
}
}
- public static class UnmodifiableDocAttributeSet
+ private static class UnmodifiableDocAttributeSet
extends UnmodifiableAttributeSet
implements DocAttributeSet, Serializable
{
}
}
- public static class UnmodifiablePrintJobAttributeSet
+ private static class UnmodifiablePrintJobAttributeSet
extends UnmodifiableAttributeSet
implements PrintJobAttributeSet, Serializable
{
}
}
- public static class UnmodifiablePrintRequestAttributeSet
+ private static class UnmodifiablePrintRequestAttributeSet
extends UnmodifiableAttributeSet
implements PrintRequestAttributeSet, Serializable
{
}
}
- public static class UnmodifiablePrintServiceAttributeSet
+ private static class UnmodifiablePrintServiceAttributeSet
extends UnmodifiableAttributeSet
implements PrintServiceAttributeSet, Serializable
{
}
}
- public static class SynchronizedAttributeSet
+ private static class SynchronizedAttributeSet
implements AttributeSet, Serializable
{
private AttributeSet set;
}
}
- public static class SynchronizedDocAttributeSet
+ private static class SynchronizedDocAttributeSet
extends SynchronizedAttributeSet
implements DocAttributeSet, Serializable
{
}
}
- public static class SynchronizedPrintJobAttributeSet
+ private static class SynchronizedPrintJobAttributeSet
extends SynchronizedAttributeSet
implements PrintJobAttributeSet, Serializable
{
}
}
- public static class SynchronizedPrintRequestAttributeSet
+ private static class SynchronizedPrintRequestAttributeSet
extends SynchronizedAttributeSet
implements PrintRequestAttributeSet, Serializable
{
}
}
- public static class SynchronizedPrintServiceAttributeSet
+ private static class SynchronizedPrintServiceAttributeSet
extends SynchronizedAttributeSet
implements PrintServiceAttributeSet, Serializable
{
* <i>PrincipalName</i> is a string representing the principal, or the
* wildcard character.</p>
*/
-public class PrivateCredentialPermission extends Permission
+public final class PrivateCredentialPermission extends Permission
implements Serializable
{
/**