This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Patch: java.rmi
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 21 Mar 2003 10:02:12 +0100
- Subject: FYI: Patch: java.rmi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I commited the attached patch to trunk to clean up java.rmi a bit.
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+etUUWSOgCCdjSDsRAvcrAJ9z6YlwBzLfXb6ob99JdeRzbYSkmgCfdjVA
+3awvzN/+w7sb5Zir3k8OWM=
=ivli
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1797
diff -u -r1.1797 ChangeLog
--- ChangeLog 21 Mar 2003 08:48:26 -0000 1.1797
+++ ChangeLog 21 Mar 2003 08:59:16 -0000
@@ -1,5 +1,36 @@
2003-03-21 Michael Koch <konqueror at gmx dot de>
+ * java/rmi/activation/Activatable.java
+ (serialVersionUID): New member variable.
+ * java/rmi/activation/ActivationGroup.java
+ (serialVersionUID): New member variable.
+ * java/rmi/activation/ActivationGroupDesc.java
+ (serialVersionUID): New member variable.
+ * java/rmi/registry/Registry.java:
+ Reformated.
+ (Registry): Deprecated.
+ * java/rmi/server/LoaderHandler.java
+ Reformated.
+ (LoaderHandler): Deprecated.
+ * java/rmi/server/LogStream.java
+ Reformated.
+ (LogStream): Deprecated.
+ * java/rmi/server/Operation.java
+ (Operation): Deprecated.
+ * java/rmi/server/RMIFailureHandler.java:
+ Reformated.
+ * java/rmi/server/RMISocketFactory.java:
+ Reformated.
+ * java/rmi/server/RemoteCall.java
+ (RemoteCall): Deprecated.
+ * java/rmi/server/RemoteStub.java:
+ Reformated.
+ * java/rmi/server/Skeleton.java
+ Reformated.
+ (Skeleton): Deprecated.
+
+2003-03-21 Michael Koch <konqueror at gmx dot de>
+
* java/io/LineNumberReader.java
(LineNumberReader): Merged documentation with classpath.
(getLineNumber): Likewise.
Index: java/rmi/activation/Activatable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/activation/Activatable.java,v
retrieving revision 1.2
diff -u -r1.2 Activatable.java
--- java/rmi/activation/Activatable.java 22 Jan 2002 22:40:25 -0000 1.2
+++ java/rmi/activation/Activatable.java 21 Mar 2003 08:59:16 -0000
@@ -48,6 +48,8 @@
public abstract class Activatable
extends RemoteServer {
+static final long serialVersionUID = -3120617863591563455L;
+
protected Activatable(String location, MarshalledObject data, boolean restart, int port) throws ActivationException, RemoteException {
throw new Error("Not implemented");
}
Index: java/rmi/activation/ActivationGroup.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/activation/ActivationGroup.java,v
retrieving revision 1.2
diff -u -r1.2 ActivationGroup.java
--- java/rmi/activation/ActivationGroup.java 22 Jan 2002 22:40:25 -0000 1.2
+++ java/rmi/activation/ActivationGroup.java 21 Mar 2003 08:59:16 -0000
@@ -46,6 +46,8 @@
extends UnicastRemoteObject
implements ActivationInstantiator {
+static final long serialVersionUID = -7696947875314805420L;
+
protected ActivationGroup(ActivationGroupID groupID) throws RemoteException {
throw new Error("Not implemented");
}
Index: java/rmi/activation/ActivationGroupDesc.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/activation/ActivationGroupDesc.java,v
retrieving revision 1.3
diff -u -r1.3 ActivationGroupDesc.java
--- java/rmi/activation/ActivationGroupDesc.java 2 Oct 2002 21:21:37 -0000 1.3
+++ java/rmi/activation/ActivationGroupDesc.java 21 Mar 2003 08:59:16 -0000
@@ -48,6 +48,8 @@
public static class CommandEnvironment
implements Serializable {
+static final long serialVersionUID = 6165754737887770191L;
+
private String cmdpath;
private String[] argv;
Index: java/rmi/registry/Registry.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/registry/Registry.java,v
retrieving revision 1.2
diff -u -r1.2 Registry.java
--- java/rmi/registry/Registry.java 22 Jan 2002 22:40:28 -0000 1.2
+++ java/rmi/registry/Registry.java 21 Mar 2003 08:59:16 -0000
@@ -43,19 +43,22 @@
import java.rmi.AlreadyBoundException;
import java.rmi.Remote;
-public interface Registry
- extends Remote {
+public interface Registry extends Remote
+{
+ public static final int REGISTRY_PORT = 1099;
-public static int REGISTRY_PORT = 1099;
+ public Remote lookup(String name)
+ throws RemoteException, NotBoundException, AccessException;
-public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException;
+ public void bind(String name, Remote obj)
+ throws RemoteException, AlreadyBoundException, AccessException;
-public void bind(String name, Remote obj) throws RemoteException, AlreadyBoundException, AccessException;
+ public void unbind(String name)
+ throws RemoteException, NotBoundException, AccessException;
-public void unbind(String name) throws RemoteException, NotBoundException, AccessException;
-
-public void rebind(String name, Remote obj) throws RemoteException, AccessException;
-
-public String[] list() throws RemoteException, AccessException;
+ public void rebind(String name, Remote obj)
+ throws RemoteException, AccessException;
+ public String[] list()
+ throws RemoteException, AccessException;
}
Index: java/rmi/server/LoaderHandler.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/LoaderHandler.java,v
retrieving revision 1.2
diff -u -r1.2 LoaderHandler.java
--- java/rmi/server/LoaderHandler.java 22 Jan 2002 22:40:29 -0000 1.2
+++ java/rmi/server/LoaderHandler.java 21 Mar 2003 08:59:16 -0000
@@ -40,15 +40,18 @@
import java.net.MalformedURLException;
import java.net.URL;
+/**
+ * @deprecated
+ */
+public interface LoaderHandler
+{
+ public static final String packagePrefix = "";
-public interface LoaderHandler {
+ public Class loadClass(String name)
+ throws MalformedURLException, ClassNotFoundException;
-public static final String packagePrefix = "";
-
-public Class loadClass(String name) throws MalformedURLException, ClassNotFoundException;
-
-public Class loadClass(URL codebase, String name) throws MalformedURLException, ClassNotFoundException;
-
-public Object getSecurityContext(ClassLoader loader);
+ public Class loadClass(URL codebase, String name)
+ throws MalformedURLException, ClassNotFoundException;
+ public Object getSecurityContext(ClassLoader loader);
}
Index: java/rmi/server/LogStream.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/LogStream.java,v
retrieving revision 1.3
diff -u -r1.3 LogStream.java
--- java/rmi/server/LogStream.java 16 Sep 2002 09:46:36 -0000 1.3
+++ java/rmi/server/LogStream.java 21 Mar 2003 08:59:16 -0000
@@ -41,62 +41,80 @@
import java.io.OutputStream;
import java.io.IOException;
+/**
+ * @deprecated
+ */
public class LogStream
- extends PrintStream {
-
-public static final int SILENT = 0;
-public static final int BRIEF = 10;
-public static final int VERBOSE = 20;
-
-private static PrintStream defStream;
-
-private LogStream(OutputStream s) {
- super(s);
-}
-
-public static LogStream log(String name) {
- throw new Error("Not implemented");
-}
-
-public static PrintStream getDefaultStream() {
- return (defStream);
-}
-
-public static void setDefaultStream(PrintStream s) {
- defStream = s;
-}
-
-public OutputStream getOutputStream() {
- return (out);
-}
-
-public void setOutputStream(OutputStream s) {
- out = s;
-}
-
-public void write(int b) {
- super.write(b);
-}
-
-public void write(byte[] b, int off, int len) {
- super.write(b, off, len);
-}
-
-public String toString() {
- throw new Error("Not implemented");
-}
-
-public static int parseLevel(String s) {
- if (s.equalsIgnoreCase("silent")) {
- return (SILENT);
- }
- if (s.equalsIgnoreCase("brief")) {
- return (BRIEF);
- }
- if (s.equalsIgnoreCase("verbose")) {
- return (VERBOSE);
- }
- return (SILENT);
+ extends PrintStream
+{
+ public static final int SILENT = 0;
+ public static final int BRIEF = 10;
+ public static final int VERBOSE = 20;
+
+ private static PrintStream defStream;
+
+ private LogStream(OutputStream s)
+ {
+ super(s);
+ }
+
+ public static LogStream log(String name)
+ {
+ throw new Error("Not implemented");
+ }
+
+ public static PrintStream getDefaultStream()
+ {
+ return (defStream);
+ }
+
+ public static void setDefaultStream(PrintStream s)
+ {
+ defStream = s;
+ }
+
+ public OutputStream getOutputStream()
+ {
+ return (out);
+ }
+
+ public void setOutputStream(OutputStream s)
+ {
+ out = s;
+ }
+
+ public void write(int b)
+ {
+ super.write(b);
+ }
+
+ public void write(byte[] b, int off, int len)
+ {
+ super.write(b, off, len);
+ }
+
+ public String toString()
+ {
+ throw new Error("Not implemented");
+ }
+
+ public static int parseLevel(String s) {
+ if (s.equalsIgnoreCase("silent"))
+ {
+ return (SILENT);
+ }
+
+ if (s.equalsIgnoreCase("brief"))
+ {
+ return (BRIEF);
+ }
+
+ if (s.equalsIgnoreCase("verbose"))
+ {
+ return (VERBOSE);
+ }
+
+ return (SILENT);
}
}
Index: java/rmi/server/Operation.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/Operation.java,v
retrieving revision 1.2
diff -u -r1.2 Operation.java
--- java/rmi/server/Operation.java 22 Jan 2002 22:40:29 -0000 1.2
+++ java/rmi/server/Operation.java 21 Mar 2003 08:59:16 -0000
@@ -37,6 +37,9 @@
package java.rmi.server;
+/**
+ * @deprecated
+ */
public class Operation {
private String operation;
Index: java/rmi/server/RMIFailureHandler.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/RMIFailureHandler.java,v
retrieving revision 1.2
diff -u -r1.2 RMIFailureHandler.java
--- java/rmi/server/RMIFailureHandler.java 22 Jan 2002 22:40:29 -0000 1.2
+++ java/rmi/server/RMIFailureHandler.java 21 Mar 2003 08:59:16 -0000
@@ -37,8 +37,10 @@
package java.rmi.server;
-public interface RMIFailureHandler {
-
-public boolean failure(Exception ex);
-
+public interface RMIFailureHandler
+{
+ /**
+ * @exception IOException If an error occurs
+ */
+ public boolean failure (Exception ex);
}
Index: java/rmi/server/RMISocketFactory.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/RMISocketFactory.java,v
retrieving revision 1.2
diff -u -r1.2 RMISocketFactory.java
--- java/rmi/server/RMISocketFactory.java 22 Jan 2002 22:40:29 -0000 1.2
+++ java/rmi/server/RMISocketFactory.java 21 Mar 2003 08:59:16 -0000
@@ -43,42 +43,64 @@
import gnu.java.rmi.server.RMIDefaultSocketFactory;
public abstract class RMISocketFactory
- implements RMIClientSocketFactory, RMIServerSocketFactory {
-
-static private RMISocketFactory defaultFactory;
-static private RMISocketFactory currentFactory;
-static private RMIFailureHandler currentHandler;
-
-static {
- defaultFactory = new RMIDefaultSocketFactory();
- currentFactory = defaultFactory;
-}
-
-public RMISocketFactory() {
-}
-
-public abstract Socket createSocket(String host, int port) throws IOException;
-
-public abstract ServerSocket createServerSocket(int port) throws IOException;
-
-public static void setSocketFactory(RMISocketFactory fac) throws IOException {
- currentFactory = fac;
-}
-
-public static RMISocketFactory getSocketFactory() {
- return (currentFactory);
-}
-
-public static RMISocketFactory getDefaultSocketFactory() {
- return (defaultFactory);
-}
-
-public static void setFailureHandler(RMIFailureHandler fh) {
- currentHandler = fh;
-}
-
-public static RMIFailureHandler getFailureHandler() {
- return (currentHandler);
-}
-
+ implements RMIClientSocketFactory, RMIServerSocketFactory
+{
+ static private RMISocketFactory defaultFactory;
+ static private RMISocketFactory currentFactory;
+ static private RMIFailureHandler currentHandler;
+
+ static
+ {
+ defaultFactory = new RMIDefaultSocketFactory();
+ currentFactory = defaultFactory;
+ }
+
+ public RMISocketFactory ()
+ {
+ }
+
+ /**
+ * @exception IOException If an error occurs
+ */
+ public abstract Socket createSocket (String host, int port)
+ throws IOException;
+
+ /**
+ * @exception IOException If an error occurs
+ */
+ public abstract ServerSocket createServerSocket (int port)
+ throws IOException;
+
+ /**
+ * @exception IOException If an error occurs
+ * @exception SecurityException FIXME
+ */
+ public static void setSocketFactory (RMISocketFactory fac)
+ throws IOException
+ {
+ currentFactory = fac;
+ }
+
+ public static RMISocketFactory getSocketFactory ()
+ {
+ return currentFactory;
+ }
+
+ public static RMISocketFactory getDefaultSocketFactory ()
+ {
+ return defaultFactory;
+ }
+
+ /**
+ * @exception SecurityException FIXME
+ */
+ public static void setFailureHandler (RMIFailureHandler fh)
+ {
+ currentHandler = fh;
+ }
+
+ public static RMIFailureHandler getFailureHandler ()
+ {
+ return currentHandler;
+ }
}
Index: java/rmi/server/RemoteCall.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/RemoteCall.java,v
retrieving revision 1.2
diff -u -r1.2 RemoteCall.java
--- java/rmi/server/RemoteCall.java 22 Jan 2002 22:40:29 -0000 1.2
+++ java/rmi/server/RemoteCall.java 21 Mar 2003 08:59:16 -0000
@@ -43,6 +43,9 @@
import java.io.ObjectInput;
import java.io.StreamCorruptedException;
+/**
+ * @deprecated
+ */
public interface RemoteCall {
public ObjectOutput getOutputStream() throws IOException;
Index: java/rmi/server/RemoteStub.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/RemoteStub.java,v
retrieving revision 1.2
diff -u -r1.2 RemoteStub.java
--- java/rmi/server/RemoteStub.java 22 Jan 2002 22:40:29 -0000 1.2
+++ java/rmi/server/RemoteStub.java 21 Mar 2003 08:59:16 -0000
@@ -1,5 +1,5 @@
/*
- Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (c) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,20 +38,22 @@
package java.rmi.server;
public abstract class RemoteStub
- extends RemoteObject {
-
-public static final long serialVersionUID = -1585587260594494182l;
-
-protected RemoteStub() {
- super();
-}
-
-protected RemoteStub(RemoteRef ref) {
- super(ref);
-}
-
-protected static void setRef(RemoteStub stub, RemoteRef ref) {
- stub.ref = ref;
-}
-
-}
+ extends RemoteObject
+{
+ static final long serialVersionUID = -1585587260594494182l;
+
+ protected RemoteStub ()
+ {
+ super ();
+ }
+
+ protected RemoteStub (RemoteRef ref)
+ {
+ super (ref);
+ }
+
+ protected static void setRef (RemoteStub stub, RemoteRef ref)
+ {
+ stub.ref = ref;
+ }
+} // class RemoteSub
Index: java/rmi/server/Skeleton.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/rmi/server/Skeleton.java,v
retrieving revision 1.2
diff -u -r1.2 Skeleton.java
--- java/rmi/server/Skeleton.java 22 Jan 2002 22:40:29 -0000 1.2
+++ java/rmi/server/Skeleton.java 21 Mar 2003 08:59:16 -0000
@@ -41,9 +41,13 @@
import java.lang.Exception;
import java.rmi.server.RemoteCall;
-public interface Skeleton {
-
-public void dispatch(Remote obj, RemoteCall theCall, int opnum, long hash) throws Exception;
-public Operation[] getOperations();
+/**
+ * @deprecated
+ */
+public interface Skeleton
+{
+ public void dispatch (Remote obj, RemoteCall theCall, int opnum, long hash)
+ throws Exception;
+ public Operation[] getOperations();
}
Index: java/text/AttributedCharacterIterator.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/AttributedCharacterIterator.java,v
retrieving revision 1.2
diff -u -r1.2 AttributedCharacterIterator.java
--- java/text/AttributedCharacterIterator.java 22 Jan 2002 22:40:37 -0000 1.2
+++ java/text/AttributedCharacterIterator.java 21 Mar 2003 08:59:16 -0000
@@ -70,6 +70,8 @@
public static class Attribute implements Serializable
{
+ private static final long serialVersionUID = -9142742483513960612L;
+
/*************************************************************************/
/*
Index: java/text/MessageFormat.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/MessageFormat.java,v
retrieving revision 1.11
diff -u -r1.11 MessageFormat.java
--- java/text/MessageFormat.java 2 Jul 2002 19:43:06 -0000 1.11
+++ java/text/MessageFormat.java 21 Mar 2003 08:59:16 -0000
@@ -143,6 +143,8 @@
public class MessageFormat extends Format
{
+ private static final long serialVersionUID = 6479157306784022952L;
+
// Helper that returns the text up to the next format opener. The
// text is put into BUFFER. Returns index of character after end of
// string. Throws IllegalArgumentException on error.