While I'm at it, this fixes the strange formatting in
UnicastRemoteObject.

2006-02-13  Roman Kennke  <[EMAIL PROTECTED]>

        * java/rmi/server/UnicastRemoteObject.java: Reformatted.

/Roman
Index: java/rmi/server/UnicastRemoteObject.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/rmi/server/UnicastRemoteObject.java,v
retrieving revision 1.11
diff -u -r1.11 UnicastRemoteObject.java
--- java/rmi/server/UnicastRemoteObject.java	13 Feb 2006 17:02:02 -0000	1.11
+++ java/rmi/server/UnicastRemoteObject.java	13 Feb 2006 17:14:25 -0000
@@ -46,58 +46,75 @@
 
 public class UnicastRemoteObject extends RemoteServer
 {
-private static final long serialVersionUID = 4974527148936298033L;
-//The following serialized fields are from Java API Documentation "Serialized form"
-private int port = 0;
-private RMIClientSocketFactory csf = null;
-private RMIServerSocketFactory ssf = null;
+  private static final long serialVersionUID = 4974527148936298033L;
 
-protected UnicastRemoteObject() throws RemoteException {
+  //The following serialized fields are from Java API Documentation
+  // "Serialized form"
+  private int port = 0;
+  private RMIClientSocketFactory csf = null;
+  private RMIServerSocketFactory ssf = null;
+
+  protected UnicastRemoteObject()
+    throws RemoteException
+  {
 	this(0);
-}
+  }
 
-protected UnicastRemoteObject(int port) throws RemoteException {
-	this(port, RMISocketFactory.getSocketFactory(), RMISocketFactory.getSocketFactory());
-}
+  protected UnicastRemoteObject(int port)
+    throws RemoteException
+  {
+	this(port, RMISocketFactory.getSocketFactory(),
+         RMISocketFactory.getSocketFactory());
+  }
 
-protected UnicastRemoteObject(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
-  this.port = port;
-  //Is RMIXXXSocketFactory serializable
-  //this.csf = csf;
-  //this.ssf = ssf;
-  this.ref = new UnicastServerRef(new ObjID(), port, ssf);
-  exportObject(this);
-}
+  protected UnicastRemoteObject(int port, RMIClientSocketFactory csf,
+                                RMIServerSocketFactory ssf)
+    throws RemoteException
+  {
+    this.port = port;
+    //Is RMIXXXSocketFactory serializable
+    //this.csf = csf;
+    //this.ssf = ssf;
+    this.ref = new UnicastServerRef(new ObjID(), port, ssf);
+    exportObject(this);
+  }
 
-protected UnicastRemoteObject(RemoteRef ref) throws RemoteException {
-	super((UnicastServerRef)ref);
+  protected UnicastRemoteObject(RemoteRef ref)
+    throws RemoteException
+  {
+	super((UnicastServerRef) ref);
 	exportObject(this);
-}
+  }
 
-public Object clone() throws CloneNotSupportedException {
+  public Object clone()
+    throws CloneNotSupportedException
+  {
 	throw new Error("Not implemented");
-}
+  }
 
-public static RemoteStub exportObject(Remote obj) throws RemoteException {
+  public static RemoteStub exportObject(Remote obj)
+    throws RemoteException
+  {
 	return (RemoteStub) exportObject(obj, 0);
-}
+  }
 
-  public static Remote exportObject(Remote obj, int port) throws RemoteException 
+  public static Remote exportObject(Remote obj, int port)
+    throws RemoteException
   {
     return exportObject(obj, port, null);
   }
-  
+
   static Remote exportObject(Remote obj, int port, RMIServerSocketFactory ssf) 
-    throws RemoteException 
+    throws RemoteException
   {
     UnicastServerRef sref = null;
     if (obj instanceof RemoteObject)
-      sref = (UnicastServerRef)((RemoteObject)obj).getRef ();
-    if(sref == null)
-      {
-	sref = new UnicastServerRef(new ObjID (), port, ssf);
-      }
-    Remote stub = sref.exportObject (obj); 
+      sref = (UnicastServerRef) ((RemoteObject) obj).getRef();
+
+    if (sref == null)
+      sref = new UnicastServerRef(new ObjID(), port, ssf);
+
+    Remote stub = sref.exportObject(obj);
     addStub(obj, stub);
     return stub;
   }
@@ -105,8 +122,9 @@
   /**
    * FIXME
    */
-  public static Remote exportObject(Remote obj, int port, RMIClientSocketFactory csf, 
-				    RMIServerSocketFactory ssf) 
+  public static Remote exportObject(Remote obj, int port,
+                                    RMIClientSocketFactory csf,
+                                    RMIServerSocketFactory ssf)
     throws RemoteException 
   {
     return (exportObject(obj, port, ssf));
@@ -117,14 +135,15 @@
   {
     if (obj instanceof RemoteObject)
       {
-	deleteStub(obj);
-	UnicastServerRef sref = (UnicastServerRef)((RemoteObject)obj).getRef();
-	return sref.unexportObject(obj, force);
+        deleteStub(obj);
+        UnicastServerRef sref =
+          (UnicastServerRef) ((RemoteObject) obj).getRef();
+        return sref.unexportObject(obj, force);
       }
     else
       {
-	//FIX ME
-	;
+        // FIXME
+        ;
       }
     return true;
   }

Reply via email to