harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r468975 - in /incubator/harmony/enhanced/classlib/trunk/modules/rmi: ./ src/main/java/java/rmi/activation/ src/test/api/java/org/apache/harmony/rmi/activation/ src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/
Date Sun, 29 Oct 2006 20:24:52 GMT
Author: ndbeyer
Date: Sun Oct 29 12:24:51 2006
New Revision: 468975

URL: http://svn.apache.org/viewvc?view=rev&rev=468975
Log:
Cleanup for 'java.rmi.activation' -
* Align exception implementation with RI behaviors
* Add exception test cases
* Add missing annotations
* Move current test cases to prescribed folder

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivateFailedExceptionTest.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivationExceptionTest.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/DefaultParamTest.java
      - copied, changed from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/DefaultParamTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloI.java
      - copied, changed from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloI.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl.java
      - copied, changed from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl_Stub.java
      - copied, changed from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl_Stub.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/StartupShutdownTest.java
      - copied, changed from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/StartupShutdownTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownGroupExceptionTest.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownObjectExceptionTest.java   (with props)
Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activatable.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivateFailedException.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationDesc.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationException.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationGroupID.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationID.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationInstantiator.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationMonitor.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationSystem.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activator.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownGroupException.java
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownObjectException.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/build.xml?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/build.xml Sun Oct 29 12:24:51 2006
@@ -137,8 +137,8 @@
                         <include name="**/*Test.java"/>
                         <exclude name="org/apache/harmony/rmi/ConnectionTest.java" />
                         <exclude name="org/apache/harmony/rmi/DGCTest.java" />
-                        <exclude name="org/apache/harmony/rmi/activation/DefaultParamTest.java" />
-                        <exclude name="org/apache/harmony/rmi/activation/StartupShutdownTest.java" />
+                        <exclude name="org/apache/harmony/rmi/tests/java/rmi/activation/DefaultParamTest.java" />
+                        <exclude name="org/apache/harmony/rmi/tests/java/rmi/activation/StartupShutdownTest.java" />
                     </fileset>
                 </batchtest>
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activatable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activatable.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activatable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activatable.java Sun Oct 29 12:24:51 2006
@@ -16,10 +16,6 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.18.4.3 $
- */
 package java.rmi.activation;
 
 import java.rmi.MarshalledObject;
@@ -30,155 +26,93 @@
 import java.rmi.server.RMIServerSocketFactory;
 import java.rmi.server.RemoteObject;
 import java.rmi.server.RemoteServer;
-
 import org.apache.harmony.rmi.common.RMILog;
 import org.apache.harmony.rmi.internal.nls.Messages;
 import org.apache.harmony.rmi.remoteref.ActivatableServerRef;
 import org.apache.harmony.rmi.server.ExportManager;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.18.4.3 $
- */
 public abstract class Activatable extends RemoteServer {
-
-    /**
-     * serialVersionUID: -3120617863591563455L
-     */
     private static final long serialVersionUID = -3120617863591563455L;
 
-    /**
-     * ActivationID
-     */
+    private static final RMILog rlog = RMILog.getActivationLog();
+
     private ActivationID id;
 
-    /**
-     * RMILogger that is used to print all the debug information.
-     *
-     */
-    private static RMILog rlog = RMILog.getActivationLog();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    protected Activatable(String codebase, MarshalledObject data,
-            boolean restart, int port) throws ActivationException,
-            RemoteException {
+    protected Activatable(String codebase, MarshalledObject data, boolean restart, int port)
+            throws ActivationException, RemoteException {
         super();
         id = exportObject(this, codebase, data, restart, port);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    protected Activatable(String codebase, MarshalledObject data,
-            boolean restart, int port, RMIClientSocketFactory csf,
-            RMIServerSocketFactory ssf) throws ActivationException,
+    protected Activatable(String codebase, MarshalledObject data, boolean restart, int port,
+            RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws ActivationException,
             RemoteException {
         super();
         id = exportObject(this, codebase, data, restart, port, csf, ssf);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     protected Activatable(ActivationID id, int port) throws RemoteException {
         super();
         // rmi.log.05=Activatable.<init>[{0}, {1}]
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.05", id, port)); //$NON-NLS-1$
         this.id = id;
-        
         // rmi.log.0E=Activatable >>> Ready to export object:
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.0E")); //$NON-NLS-1$
         exportObject(this, id, port);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    protected Activatable(ActivationID id, int port,
-            RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
-            throws RemoteException {
+    protected Activatable(ActivationID id, int port, RMIClientSocketFactory csf,
+            RMIServerSocketFactory ssf) throws RemoteException {
         super();
         this.id = id;
         exportObject(this, id, port, csf, ssf);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     protected ActivationID getID() {
         return id;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static Remote register(ActivationDesc desc)
-            throws UnknownGroupException, ActivationException, RemoteException {
-
+    public static Remote register(ActivationDesc desc) throws UnknownGroupException,
+            ActivationException, RemoteException {
         ActivationSystem as = ActivationGroup.getSystem();
         ActivationID aid = as.registerObject(desc);
         // rmi.log.0F=aid = {0}
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.0F", aid)); //$NON-NLS-1$
-
-        return org.apache.harmony.rmi.remoteref.ActivatableRef
-                .getStub(desc, aid);
+        return org.apache.harmony.rmi.remoteref.ActivatableRef.getStub(desc, aid);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static ActivationID exportObject(Remote obj, String location,
-            MarshalledObject data, boolean restart, int port,
-            RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
+    public static ActivationID exportObject(Remote obj, String location, MarshalledObject data,
+            boolean restart, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
             throws ActivationException, RemoteException {
-
-        ActivationDesc adesc = new ActivationDesc(obj.getClass().getName(), location, data, restart);
+        ActivationDesc adesc = new ActivationDesc(obj.getClass().getName(), location, data,
+                restart);
         ActivationID aid = ActivationGroup.getSystem().registerObject(adesc);
-        Remote stub = exportObject(obj, aid, port, csf, ssf);
-
+        exportObject(obj, aid, port, csf, ssf);
         return aid;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static Remote exportObject(Remote robj, ActivationID aid, int port,
-            RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
-            throws RemoteException {
-
+            RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException {
         ActivatableServerRef asr = new ActivatableServerRef(aid, port, csf, ssf);
-
         return ExportManager.exportObject(robj, asr, false); //asr.exportObject(robj, null, false, true, true);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static ActivationID exportObject(Remote robj, String location,
-            MarshalledObject data, boolean restart, int port)
-            throws ActivationException, RemoteException {
-
-        ActivationDesc adesc = new ActivationDesc(robj.getClass().getName(),
-                location, data, restart);
+            MarshalledObject data, boolean restart, int port) throws ActivationException,
+            RemoteException {
+        ActivationDesc adesc = new ActivationDesc(robj.getClass().getName(), location, data,
+                restart);
         ActivationID aid = ActivationGroup.getSystem().registerObject(adesc);
-        Remote stub = exportObject(robj, aid, port);
+        exportObject(robj, aid, port);
         ActivationGroup curAG = ActivationGroup.getCurrentAG();
         // rmi.console.00=CurAG = {0}
         System.out.println(Messages.getString("rmi.console.00", curAG)); //$NON-NLS-1$
         curAG.activeObject(aid, robj);
-
         return aid;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static Remote exportObject(Remote robj, ActivationID aid, int port) throws RemoteException {
+    public static Remote exportObject(Remote robj, ActivationID aid, int port)
+            throws RemoteException {
         // rmi.log.10=Activatable >>> exportObject
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.10")); //$NON-NLS-1$
         ActivatableServerRef asr = new ActivatableServerRef(aid, port);
@@ -187,7 +121,6 @@
         }
         // rmi.log.11=Activatable >>> ActivatableServerRef={0}
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.11", asr)); //$NON-NLS-1$
-
         ExportManager.exportObject(robj, asr, false, true, true);
         // rmi.log.12=Activatable >>> asr after export: {0}
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.12", asr)); //$NON-NLS-1$
@@ -197,34 +130,23 @@
         return rmt;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static boolean inactive(ActivationID aid)
-            throws UnknownObjectException, ActivationException, RemoteException {
+    public static boolean inactive(ActivationID aid) throws UnknownObjectException,
+            ActivationException, RemoteException {
         return ActivationGroup.getCurrentAG().inactiveObject(aid);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public static void unregister(ActivationID aid)
-            throws UnknownObjectException, ActivationException, RemoteException {
+    public static void unregister(ActivationID aid) throws UnknownObjectException,
+            ActivationException, RemoteException {
         ActivationGroup.getSystem().unregisterObject(aid);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public static boolean unexportObject(Remote obj, boolean force)
             throws NoSuchObjectException {
         return ExportManager.unexportObject(obj, force);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public String toString() {
-        return this.getClass() + ": [ActivationID =" + id + "; Ref =" + ref+ "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        return this.getClass() + ": [ActivationID =" + id + "; Ref =" + ref + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivateFailedException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivateFailedException.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivateFailedException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivateFailedException.java Sun Oct 29 12:24:51 2006
@@ -16,35 +16,17 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.7.2.3 $
- */
 package java.rmi.activation;
 
 import java.rmi.RemoteException;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.7.2.3 $
- */
 public class ActivateFailedException extends RemoteException {
-
     private static final long serialVersionUID = 4863550261346652506L;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivateFailedException(String message, Exception nested_exception) {
         super(message, nested_exception);
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivateFailedException(String message) {
         super(message);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationDesc.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationDesc.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationDesc.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationDesc.java Sun Oct 29 12:24:51 2006
@@ -16,29 +16,13 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.9.2.3 $
- */
 package java.rmi.activation;
 
 import java.io.Serializable;
 import java.rmi.MarshalledObject;
-
 import org.apache.harmony.rmi.internal.nls.Messages;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.9.2.3 $
- */
 public final class ActivationDesc implements Serializable {
-
-    /**
-     * This value shows that the class is compatible with J2SDK v. 1.2
-     */
     private static final long serialVersionUID = 7455834104417690957L;
 
     /**
@@ -66,19 +50,13 @@
      */
     private boolean restart;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationDesc(String className, String location,
-            MarshalledObject data) throws ActivationException {
-
+    public ActivationDesc(String className, String location, MarshalledObject data)
+            throws ActivationException {
         ActivationGroupID currentGID = ActivationGroup.currentGroupID();
-
         if (currentGID == null) {
             // rmi.0D=The default group for this JVM is inactive.
             throw new ActivationException(Messages.getString("rmi.0D")); //$NON-NLS-1$
         }
-
         this.groupID = currentGID;
         this.className = className;
         this.location = location;
@@ -86,19 +64,13 @@
         this.restart = false;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationDesc(String className, String location,
-            MarshalledObject data, boolean restart) throws ActivationException {
-
+    public ActivationDesc(String className, String location, MarshalledObject data,
+            boolean restart) throws ActivationException {
         ActivationGroupID currentGID = ActivationGroup.currentGroupID();
-
         if (currentGID == null) {
             // rmi.0D=The default group for this JVM is inactive.
             throw new ActivationException(Messages.getString("rmi.0D")); //$NON-NLS-1$
         }
-
         this.groupID = currentGID;
         this.className = className;
         this.location = location;
@@ -106,17 +78,12 @@
         this.restart = restart;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationDesc(ActivationGroupID groupID, String className,
-            String location, MarshalledObject data) {
-
+    public ActivationDesc(ActivationGroupID groupID, String className, String location,
+            MarshalledObject data) {
         if (groupID == null) {
             // rmi.10=The groupID can't be null.
             throw new IllegalArgumentException(Messages.getString("rmi.10")); //$NON-NLS-1$
         }
-
         this.groupID = groupID;
         this.className = className;
         this.location = location;
@@ -124,12 +91,8 @@
         this.restart = false;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationDesc(ActivationGroupID groupID, String className,
-            String location, MarshalledObject data, boolean restart) {
-
+    public ActivationDesc(ActivationGroupID groupID, String className, String location,
+            MarshalledObject data, boolean restart) {
         if (groupID == null) {
             // rmi.10=The groupID can't be null.
             throw new IllegalArgumentException(Messages.getString("rmi.10")); //$NON-NLS-1$
@@ -141,44 +104,27 @@
         this.restart = restart;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivationGroupID getGroupID() {
         return groupID;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public MarshalledObject getData() {
         return data;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public String getLocation() {
         return location;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public String getClassName() {
         return className;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public boolean getRestartMode() {
         return restart;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public boolean equals(Object obj) {
         if (obj instanceof ActivationDesc) {
             ActivationDesc objCasted = (ActivationDesc) obj;
@@ -189,27 +135,21 @@
                     .equals(objCasted.className);
             p2 = (location == null) ? objCasted.location == null : location
                     .equals(objCasted.location);
-            p3 = (data == null) ? objCasted.data == null : data
-                    .equals(objCasted.data);
+            p3 = (data == null) ? objCasted.data == null : data.equals(objCasted.data);
             p4 = (restart == objCasted.restart);
             return p0 && p1 && p2 && p3 && p4;
-
         }
         return false;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public int hashCode() {
         int groupID_Hash = (groupID == null) ? 0 : groupID.hashCode();
         int className_Hash = (className == null) ? 0 : className.hashCode();
         int location_Hash = (location == null) ? 0 : location.hashCode();
         int data_Hash = (data == null) ? 0 : data.hashCode();
         int restart_Hash = (restart == false) ? 0 : 1;
-
-        int hashCode = groupID_Hash ^ className_Hash ^ location_Hash
-                ^ data_Hash ^ restart_Hash;
+        int hashCode = groupID_Hash ^ className_Hash ^ location_Hash ^ data_Hash ^ restart_Hash;
         return hashCode;
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationException.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationException.java Sun Oct 29 12:24:51 2006
@@ -16,60 +16,41 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.7.4.2 $
- */
 package java.rmi.activation;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.7.4.2 $
- */
 public class ActivationException extends Exception {
-
     private static final long serialVersionUID = -4320118837291406071l;
 
     public Throwable detail;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivationException(String message, Throwable detail) {
-        super(message);
+        // pass null for cause to ensure initCause can't be used
+        super(message, null);
         this.detail = detail;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivationException(String message) {
-        super(message);
+        // pass null for cause to ensure initCause can't be used
+        super(message, null);
         this.detail = null;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivationException() {
-        super();
+        // pass null for cause to ensure initCause can't be used
+        super(null, null);
         this.detail = null;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public Throwable getCause() {
         return detail;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public String getMessage() {
-        return super.getMessage() + "[detail throwable = " + detail + "] "; //$NON-NLS-1$ //$NON-NLS-2$
+        if (detail != null) {
+            return super.getMessage() + "[detail throwable = " + detail + "] "; //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        return super.getMessage();
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationGroupID.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationGroupID.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationGroupID.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationGroupID.java Sun Oct 29 12:24:51 2006
@@ -16,68 +16,43 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.8.2.2 $
- */
 package java.rmi.activation;
 
 import java.io.Serializable;
 import java.rmi.server.UID;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.8.2.2 $
- */
 public class ActivationGroupID implements Serializable {
-
     private static final long serialVersionUID = -1648432278909740833L;
 
-    private UID uid;
+    private final UID uid;
 
-    private ActivationSystem system;
+    private final ActivationSystem system;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivationGroupID(ActivationSystem system) {
+        super();
         this.system = system;
         uid = new UID();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public boolean equals(Object obj) {
         if (obj instanceof ActivationGroupID) {
             ActivationGroupID id = (ActivationGroupID) obj;
             return (uid.equals(id.uid) && system.equals(id.system));
-        } else {
-            return false;
         }
+        return false;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivationSystem getSystem() {
         return system;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public int hashCode() {
         return uid.hashCode();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-
-     */
+    @Override
     public String toString() {
         return "ActivationGroupID[" + uid + "; " + system + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationID.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationID.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationID.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationID.java Sun Oct 29 12:24:51 2006
@@ -16,10 +16,6 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.15.2.3 $
- */
 package java.rmi.activation;
 
 import java.io.IOException;
@@ -34,24 +30,14 @@
 import java.rmi.server.RemoteObject;
 import java.rmi.server.RemoteRef;
 import java.rmi.server.UID;
-
 import org.apache.harmony.rmi.common.RMILog;
 import org.apache.harmony.rmi.internal.nls.Messages;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.15.2.3 $
- */
 public class ActivationID implements Serializable {
-
-    /**
-     * Serial Version UID
-     */
     private static final long serialVersionUID = -4608673054848209235L;
 
+    private static final RMILog rlog = RMILog.getActivationLog();
+
     /**
      * A unique identifier for the object.
      */
@@ -62,35 +48,24 @@
      */
     private transient Activator activator;
 
-    private static RMILog rlog = RMILog.getActivationLog();
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public ActivationID(Activator activator) {
+        super();
         this.activator = activator;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public Remote activate(boolean force) throws ActivationException,
-            UnknownObjectException, RemoteException {
+    public Remote activate(boolean force) throws ActivationException, UnknownObjectException,
+            RemoteException {
         // rmi.log.00=ActivationID.activate: activator = {0}
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.00", activator)); //$NON-NLS-1$
-
         try {
-            MarshalledObject stub = (MarshalledObject) activator.activate(this,
-                    force);
+            MarshalledObject stub = activator.activate(this, force);
             // rmi.log.01=ActivationID.activate:stub={0}
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.01", stub)); //$NON-NLS-1$
             Remote deserialized_stub = (Remote) stub.get();
             // rmi.log.02=ActivationID.activate: deserialized_stub = {0}
-            rlog.log(RMILog.VERBOSE,
-                    Messages.getString("rmi.log.02", deserialized_stub)); //$NON-NLS-1$
+            rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.02", deserialized_stub)); //$NON-NLS-1$
             // rmi.log.03=<<<<<<<<< ActivationID.activate COMPLETED.
-            rlog.log(RMILog.VERBOSE,Messages.getString("rmi.log.03")); //$NON-NLS-1$
-
+            rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.03")); //$NON-NLS-1$
             return deserialized_stub;
         } catch (IOException ioe) {
             // rmi.0E=An IOException occured while deserializing the object from its internal representation.
@@ -101,9 +76,7 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public boolean equals(Object obj) {
         if (obj instanceof ActivationID) {
             ActivationID castedObj = (ActivationID) obj;
@@ -115,30 +88,22 @@
         return false;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public int hashCode() {
         return activator.hashCode() ^ uid.hashCode();
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    private void readObject(ObjectInputStream in) throws IOException,
-            ClassNotFoundException {
+    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
         // rmi.log.06=ActivationID.readObject:
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.06")); //$NON-NLS-1$
         try {
             uid = (UID) in.readObject();
             // rmi.log.07=UID={0}
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.07", uid)); //$NON-NLS-1$
-
             String refType = in.readUTF();
             // rmi.log.08=refType={0}
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.08", refType)); //$NON-NLS-1$
-
-            Class cl = Class.forName("org.apache.harmony.rmi.remoteref." //$NON-NLS-1$
+            Class<?> cl = Class.forName("org.apache.harmony.rmi.remoteref." //$NON-NLS-1$
                     + refType);
             RemoteRef ref = (RemoteRef) cl.newInstance();
             // rmi.log.09=ref = {0}
@@ -146,15 +111,13 @@
             ref.readExternal(in);
             // rmi.log.0A=readExternal finished successfully.
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.0A")); //$NON-NLS-1$
-
-            Class activator_class = RMIClassLoader.loadClass((String) null,
+            Class<?> activator_class = RMIClassLoader.loadClass((String) null,
                     "org.apache.harmony.rmi.activation.Rmid_Stub"); //$NON-NLS-1$
-            Class constructor_parameter_classes[] = { RemoteRef.class };
-            Constructor constructor = activator_class
+            Class[] constructor_parameter_classes = { RemoteRef.class };
+            Constructor<?> constructor = activator_class
                     .getConstructor(constructor_parameter_classes);
             Object[] constructor_parameters = { ref };
-            activator = (Activator) constructor
-                    .newInstance(constructor_parameters);
+            activator = (Activator) constructor.newInstance(constructor_parameters);
             // rmi.log.0B=ActivationID.readObject COMPLETED.
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.0B")); //$NON-NLS-1$
         } catch (Throwable t) {
@@ -163,22 +126,16 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    private void writeObject(ObjectOutputStream out) throws IOException,
-            ClassNotFoundException {
+    private void writeObject(ObjectOutputStream out) throws IOException, ClassNotFoundException {
         // rmi.log.0C=ActivationID.writeObject:
         rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.0C")); //$NON-NLS-1$
         try {
             out.writeObject(uid);
             // rmi.log.0D=activator = {0}
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.0D", activator)); //$NON-NLS-1$
-
             RemoteRef ref = ((RemoteObject) activator).getRef();
             // rmi.log.09=ref = {0}
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.09", ref)); //$NON-NLS-1$
-
             String refType = ref.getRefClass(out);
             // rmi.log.08=refType={0}
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.08", refType)); //$NON-NLS-1$
@@ -186,18 +143,14 @@
             ref.writeExternal(out);
             // rmi.log.04=ActivationID.writeObject COMPLETED.
             rlog.log(RMILog.VERBOSE, Messages.getString("rmi.log.04")); //$NON-NLS-1$
-
         } catch (Throwable t) {
             // rmi.0A=Unable to serialize ActivationID: {0}
             throw new IOException(Messages.getString("rmi.0A", t.getMessage()));//$NON-NLS-1$
-                    
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
+    @Override
     public String toString() {
-        return "ActivationID: " + "[" + uid + "; " + activator + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+        return "ActivationID: [" + uid + "; " + activator + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationInstantiator.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationInstantiator.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationInstantiator.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationInstantiator.java Sun Oct 29 12:24:51 2006
@@ -16,28 +16,13 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.5.4.3 $
- */
 package java.rmi.activation;
 
 import java.rmi.MarshalledObject;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.5.4.3 $
- */
 public interface ActivationInstantiator extends Remote {
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public MarshalledObject newInstance(ActivationID a0, ActivationDesc a1)
+    MarshalledObject newInstance(ActivationID id, ActivationDesc desc)
             throws ActivationException, RemoteException;
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationMonitor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationMonitor.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationMonitor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationMonitor.java Sun Oct 29 12:24:51 2006
@@ -16,40 +16,18 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.5.4.2 $
- */
 package java.rmi.activation;
 
 import java.rmi.MarshalledObject;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.5.4.2 $
- */
 public interface ActivationMonitor extends Remote {
+    void activeObject(ActivationID id, MarshalledObject data) throws UnknownObjectException,
+            RemoteException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void activeObject(ActivationID a0, MarshalledObject a1)
-            throws UnknownObjectException, RemoteException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void inactiveObject(ActivationID a0)
-            throws UnknownObjectException, RemoteException;
+    void inactiveObject(ActivationID id) throws UnknownObjectException, RemoteException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void inactiveGroup(ActivationGroupID a0, long a1)
+    void inactiveGroup(ActivationGroupID groupId, long incarnation)
             throws UnknownGroupException, RemoteException;
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationSystem.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationSystem.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationSystem.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/ActivationSystem.java Sun Oct 29 12:24:51 2006
@@ -16,87 +16,42 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.6.2.3 $
- */
 package java.rmi.activation;
 
 import java.rmi.Remote;
 import java.rmi.RemoteException;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.6.2.3 $
- */
 public interface ActivationSystem extends Remote {
+    int SYSTEM_PORT = 1098;
 
-    public static final int SYSTEM_PORT = 1098;
+    ActivationMonitor activeGroup(ActivationGroupID gID, ActivationInstantiator aInst,
+            long incarnation) throws UnknownGroupException, ActivationException,
+            RemoteException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationMonitor activeGroup(ActivationGroupID gID,
-                                         ActivationInstantiator aInst,
-                                         long incarnation)
-            throws UnknownGroupException, ActivationException, RemoteException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationGroupDesc setActivationGroupDesc(ActivationGroupID gID,
-                                                      ActivationGroupDesc gDesc)
+    ActivationGroupDesc setActivationGroupDesc(ActivationGroupID gID, ActivationGroupDesc gDesc)
             throws ActivationException, UnknownGroupException, RemoteException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationDesc setActivationDesc(ActivationID aID,
-                                            ActivationDesc aDesc)
-            throws ActivationException, UnknownObjectException,
-                   UnknownGroupException, RemoteException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationID registerObject(ActivationDesc aDesc)
-            throws ActivationException, UnknownGroupException, RemoteException;
+    ActivationDesc setActivationDesc(ActivationID aID, ActivationDesc aDesc)
+            throws ActivationException, UnknownObjectException, UnknownGroupException,
+            RemoteException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationGroupID registerGroup(ActivationGroupDesc gDesc)
-            throws ActivationException, RemoteException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationGroupDesc getActivationGroupDesc(ActivationGroupID gID)
-            throws ActivationException, UnknownGroupException, RemoteException;
+    ActivationID registerObject(ActivationDesc aDesc) throws ActivationException,
+            UnknownGroupException, RemoteException;
+
+    ActivationGroupID registerGroup(ActivationGroupDesc gDesc) throws ActivationException,
+            RemoteException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public ActivationDesc getActivationDesc(ActivationID aID)
-            throws ActivationException, UnknownObjectException, RemoteException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void unregisterObject(ActivationID aID)
-            throws ActivationException, UnknownObjectException, RemoteException;
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void unregisterGroup(ActivationGroupID gID)
+    ActivationGroupDesc getActivationGroupDesc(ActivationGroupID gID)
             throws ActivationException, UnknownGroupException, RemoteException;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public void shutdown() throws RemoteException;
+    ActivationDesc getActivationDesc(ActivationID aID) throws ActivationException,
+            UnknownObjectException, RemoteException;
+
+    void unregisterObject(ActivationID aID) throws ActivationException, UnknownObjectException,
+            RemoteException;
+
+    void unregisterGroup(ActivationGroupID gID) throws ActivationException,
+            UnknownGroupException, RemoteException;
+
+    void shutdown() throws RemoteException;
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activator.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activator.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activator.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/Activator.java Sun Oct 29 12:24:51 2006
@@ -16,28 +16,13 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.6.4.2 $
- */
 package java.rmi.activation;
 
 import java.rmi.MarshalledObject;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.6.4.2 $
- */
 public interface Activator extends Remote {
-
-    /**
-     * @com.intel.drl.spec_ref
-     */
-    public MarshalledObject activate(ActivationID id, boolean force)
-            throws ActivationException, UnknownObjectException, RemoteException;
+    MarshalledObject activate(ActivationID id, boolean force) throws ActivationException,
+            UnknownObjectException, RemoteException;
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownGroupException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownGroupException.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownGroupException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownGroupException.java Sun Oct 29 12:24:51 2006
@@ -16,26 +16,11 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.6.4.3 $
- */
 package java.rmi.activation;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.6.4.3 $
- */
 public class UnknownGroupException extends ActivationException {
-
     private static final long serialVersionUID = 7056094974750002460L;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public UnknownGroupException(String message) {
         super(message);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownObjectException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownObjectException.java?view=diff&rev=468975&r1=468974&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownObjectException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/activation/UnknownObjectException.java Sun Oct 29 12:24:51 2006
@@ -16,26 +16,11 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.7.4.3 $
- */
 package java.rmi.activation;
 
-
-/**
- * @com.intel.drl.spec_ref
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.7.4.3 $
- */
 public class UnknownObjectException extends ActivationException {
-
     private static final long serialVersionUID = 3425547551622251430L;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public UnknownObjectException(String message) {
         super(message);
     }

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivateFailedExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivateFailedExceptionTest.java?view=auto&rev=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivateFailedExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivateFailedExceptionTest.java Sun Oct 29 12:24:51 2006
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.harmony.rmi.tests.java.rmi.activation;
+
+import java.rmi.activation.ActivateFailedException;
+import junit.framework.TestCase;
+
+public class ActivateFailedExceptionTest extends TestCase {
+    /**
+     * Test method for {@link java.rmi.activation.ActivateFailedException#ActivateFailedException(java.lang.String, java.lang.Exception)}.
+     */
+    public void testActivateFailedExceptionStringException() {
+        NullPointerException npe = new NullPointerException("npe");
+        ActivateFailedException e = new ActivateFailedException("fixture", npe);
+        assertTrue(e.getMessage().contains("fixture"));
+        assertSame(npe, e.getCause());
+    }
+
+    /**
+     * Test method for {@link java.rmi.activation.ActivateFailedException#ActivateFailedException(java.lang.String)}.
+     */
+    public void testActivateFailedExceptionString() {
+        ActivateFailedException e = new ActivateFailedException("fixture");
+        assertEquals("fixture", e.getMessage());
+        assertNull(e.getCause());
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivateFailedExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivationExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivationExceptionTest.java?view=auto&rev=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivationExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivationExceptionTest.java Sun Oct 29 12:24:51 2006
@@ -0,0 +1,73 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.harmony.rmi.tests.java.rmi.activation;
+
+import java.rmi.activation.ActivationException;
+import junit.framework.TestCase;
+
+/**
+ * <p></p>
+ *
+ */
+public class ActivationExceptionTest extends TestCase {
+    /**
+     * Test method for {@link java.rmi.activation.ActivationException#ActivationException(java.lang.String, java.lang.Throwable)}.
+     */
+    public void testActivationExceptionStringThrowable() {
+        NullPointerException npe = new NullPointerException("npe");
+        ActivationException e = new ActivationException("fixture", npe);
+        assertTrue(e.getMessage().contains("fixture"));
+        assertSame(npe, e.getCause());
+        assertSame(npe, e.detail);
+        try {
+            e.initCause(new NullPointerException());
+            fail("did not throw illegal state exception");
+        } catch (IllegalStateException ise) {
+        }
+    }
+
+    /**
+     * Test method for {@link java.rmi.activation.ActivationException#ActivationException(java.lang.String)}.
+     */
+    public void testActivationExceptionString() {
+        ActivationException e = new ActivationException("fixture");
+        assertTrue(e.getMessage().contains("fixture"));
+        assertNull(e.getCause());
+        assertNull(e.detail);
+        try {
+            e.initCause(new NullPointerException());
+            fail("did not throw illegal state exception");
+        } catch (IllegalStateException ise) {
+        }
+    }
+
+    /**
+     * Test method for {@link java.rmi.activation.ActivationException#ActivationException()}.
+     */
+    public void testActivationException() {
+        ActivationException e = new ActivationException();
+        assertNull(e.getMessage());
+        assertNull(e.getCause());
+        assertNull(e.detail);
+        try {
+            e.initCause(new NullPointerException());
+            fail("did not throw illegal state exception");
+        } catch (IllegalStateException ise) {
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/ActivationExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/DefaultParamTest.java (from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/DefaultParamTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/DefaultParamTest.java?view=diff&rev=468975&p1=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/DefaultParamTest.java&r1=468812&p2=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/DefaultParamTest.java&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/DefaultParamTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/DefaultParamTest.java Sun Oct 29 12:24:51 2006
@@ -16,11 +16,7 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.1.2.5 $
- */
-package org.apache.harmony.rmi.activation;
+package org.apache.harmony.rmi.tests.java.rmi.activation;
 
 import java.rmi.MarshalledObject;
 import java.rmi.Remote;
@@ -40,19 +36,13 @@
 
 import junit.framework.TestCase;
 
-
-/**
- * DefaultParamTest
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.1.2.5 $
- */
 public class DefaultParamTest extends TestCase {
 
-    SubProcess rmid;
+    private SubProcess rmid;
 
-    SubProcess rmiregistry;
+    private SubProcess rmiregistry;
 
+    @Override
     public void setUp() {
         try {
             rmid = JavaInvoker.invokeSimilar((String[]) null, "org.apache.harmony.rmi.activation.Rmid", (String[]) null, true, true);
@@ -73,6 +63,7 @@
         }
     }
 
+    @Override
     public void tearDown() {
         rmid.destroy();
         rmiregistry.destroy();
@@ -97,7 +88,7 @@
             MarshalledObject data = new MarshalledObject("HelloImpl");
             System.out.println("MarshalledObject data = " + data);
 
-            ActivationDesc desc = new ActivationDesc(groupID, "org.apache.harmony.rmi.activation.HelloImpl", "", null);
+            ActivationDesc desc = new ActivationDesc(groupID, "org.apache.harmony.rmi.tests.java.rmi.activation.HelloImpl", "", null);
             System.out.println("Registering ActivationDesc:");
             Remote stub = Activatable.register(desc);
             System.out.println("Activation descriptor registered: " + stub);

Copied: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloI.java (from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloI.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloI.java?view=diff&rev=468975&p1=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloI.java&r1=468812&p2=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloI.java&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloI.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloI.java Sun Oct 29 12:24:51 2006
@@ -20,7 +20,7 @@
  * @author  Victor A. Martynov
  * @version $Revision: 1.1.2.2 $
  */
-package org.apache.harmony.rmi.activation;
+package org.apache.harmony.rmi.tests.java.rmi.activation;
 
 import java.rmi.Remote;
 import java.rmi.RemoteException;

Copied: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl.java (from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl.java?view=diff&rev=468975&p1=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl.java&r1=468812&p2=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl.java&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl.java Sun Oct 29 12:24:51 2006
@@ -16,24 +16,15 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.1.2.2 $
- */
-package org.apache.harmony.rmi.activation;
+package org.apache.harmony.rmi.tests.java.rmi.activation;
 import java.rmi.RemoteException;
 import java.rmi.MarshalledObject;
 import java.rmi.activation.Activatable;
 import java.rmi.activation.ActivationID;
 
-
-/**
- * HelloI interface implementation.
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.1.2.2 $
- */
 public class HelloImpl extends Activatable implements HelloI {
+
+    private static final long serialVersionUID = 7607383862878908241L;
 
     public HelloImpl(ActivationID id, MarshalledObject data) throws RemoteException {
         super(id, 0);

Copied: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl_Stub.java (from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl_Stub.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl_Stub.java?view=diff&rev=468975&p1=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl_Stub.java&r1=468812&p2=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl_Stub.java&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/HelloImpl_Stub.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/HelloImpl_Stub.java Sun Oct 29 12:24:51 2006
@@ -8,11 +8,11 @@
  * DO NOT EDIT!!!
  * Contents subject to change without notice!
  */
-package org.apache.harmony.rmi.activation;
+package org.apache.harmony.rmi.tests.java.rmi.activation;
 
 
 public final class HelloImpl_Stub extends java.rmi.server.RemoteStub
-        implements org.apache.harmony.rmi.activation.HelloI, java.rmi.Remote {
+        implements org.apache.harmony.rmi.tests.java.rmi.activation.HelloI, java.rmi.Remote {
 
     private static final long serialVersionUID = 2;
 
@@ -20,10 +20,10 @@
 
     static {
         try {
-            $method_get_0 = org.apache.harmony.rmi.activation.HelloI.class.getMethod("get", new java.lang.Class[] {});
+            $method_get_0 = org.apache.harmony.rmi.tests.java.rmi.activation.HelloI.class.getMethod("get", new java.lang.Class[] {});
         } catch (java.lang.NoSuchMethodException e) {
             throw new java.lang.NoSuchMethodError(
-                    "Stub class initialization failed: org.apache.harmony.rmi.activation.HelloImpl_Stub");
+                    "Stub class initialization failed: org.apache.harmony.rmi.tests.java.rmi.activation.HelloImpl_Stub");
         }
     }
 

Copied: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/StartupShutdownTest.java (from r468812, incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/StartupShutdownTest.java)
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/StartupShutdownTest.java?view=diff&rev=468975&p1=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/StartupShutdownTest.java&r1=468812&p2=incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/StartupShutdownTest.java&r2=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/activation/StartupShutdownTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/StartupShutdownTest.java Sun Oct 29 12:24:51 2006
@@ -16,42 +16,24 @@
  * limitations under the License.
  */
 
-/**
- * @author  Victor A. Martynov
- * @version $Revision: 1.1.2.5 $
- */
-package org.apache.harmony.rmi.activation;
+package org.apache.harmony.rmi.tests.java.rmi.activation;
 
 import java.rmi.activation.ActivationGroup;
 import java.rmi.activation.ActivationSystem;
-
 import org.apache.harmony.rmi.JavaInvoker;
 import org.apache.harmony.rmi.common.SubProcess;
-
 import junit.framework.TestCase;
 
-
-/**
- * StartupShutdownTest
- *
- * @author  Victor A. Martynov
- * @version $Revision: 1.1.2.5 $
- */
 public class StartupShutdownTest extends TestCase {
-
-    SubProcess rmid;
-    SubProcess rmiregistry;
-
     public void testStartup() throws Exception {
-        rmid = JavaInvoker.invokeSimilar((String[]) null,
-                "org.apache.harmony.rmi.activation.Rmid",
-                (String[]) null, true, true);
+        SubProcess rmid = JavaInvoker.invokeSimilar((String[]) null,
+                "org.apache.harmony.rmi.activation.Rmid", (String[]) null, true, true);
         rmid.pipeError();
         rmid.pipeInput();
         rmid.closeOutput();
         Thread.sleep(5000);
         ActivationSystem as = ActivationGroup.getSystem();
-
+        assertNotNull(as);
         rmid.destroy();
     }
 }

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownGroupExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownGroupExceptionTest.java?view=auto&rev=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownGroupExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownGroupExceptionTest.java Sun Oct 29 12:24:51 2006
@@ -0,0 +1,38 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.harmony.rmi.tests.java.rmi.activation;
+
+import java.rmi.activation.UnknownGroupException;
+import junit.framework.TestCase;
+
+public class UnknownGroupExceptionTest extends TestCase {
+    /**
+     * Test method for {@link java.rmi.activation.UnknownGroupException#UnknownGroupException(java.lang.String)}.
+     */
+    public void testUnknownGroupException() {
+        UnknownGroupException e = new UnknownGroupException("fixture");
+        assertEquals("fixture", e.getMessage());
+        assertNull(e.getCause());
+        assertNull(e.detail);
+        try {
+            e.initCause(new NullPointerException());
+            fail("did not throw illegal state exception");
+        } catch (IllegalStateException ise) {
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownGroupExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownObjectExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownObjectExceptionTest.java?view=auto&rev=468975
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownObjectExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownObjectExceptionTest.java Sun Oct 29 12:24:51 2006
@@ -0,0 +1,38 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.harmony.rmi.tests.java.rmi.activation;
+
+import java.rmi.activation.UnknownObjectException;
+import junit.framework.TestCase;
+
+public class UnknownObjectExceptionTest extends TestCase {
+    /**
+     * Test method for {@link java.rmi.activation.UnknownObjectException#UnknownObjectException(java.lang.String)}.
+     */
+    public void testUnknownObjectException() {
+        UnknownObjectException e = new UnknownObjectException("fixture");
+        assertEquals("fixture", e.getMessage());
+        assertNull(e.getCause());
+        assertNull(e.detail);
+        try {
+            e.initCause(new NullPointerException());
+            fail("did not throw illegal state exception");
+        } catch (IllegalStateException ise) {
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/tests/java/rmi/activation/UnknownObjectExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message