Java 类java.rmi.server.ServerCloneException 实例源码

项目:jdk8u-jdk    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:openjdk-jdk10    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:openjdk9    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:jdk8u_jdk    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:lookaside_java-1.8.0-openjdk    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:infobip-open-jdk-8    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:jdk8u-dev-jdk    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:jdk7-jdk    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:openjdk-source-code-learn    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:OLD-OpenJDK8    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:cn1    文件:ServerCloneExceptionTest.java   
/**
 * Sets up the fixture, for example, open a network connection. This method
 * is called before a test is executed.
 */
@Override
protected void setUp() {
    errorMessage = "Clone Error";
    causeMessage = "Caused Exception";
    cause = new ServerCloneException(causeMessage);
}
项目:cn1    文件:ServerCloneExceptionTest.java   
/**
 * @tests java.rmi.server.ServerCloneException#ServerCloneException(String)
 */
public void test_Constructor_String() {
    ServerCloneException e = new ServerCloneException(errorMessage);
    assertEquals(errorMessage, e.getMessage());
    assertNull(e.detail);
    try {
        e.initCause(e);
        fail("No expected IllegalStateException");
    } catch (IllegalStateException exception) {
        // expected
    }
}
项目:cn1    文件:ServerCloneExceptionTest.java   
public void assertDeserialized(Serializable initial,
        Serializable deserialized) {

    SerializationTest.THROWABLE_COMPARATOR.assertDeserialized(initial, deserialized);

    ServerCloneException initEx = (ServerCloneException) initial;
    ServerCloneException desrEx = (ServerCloneException) deserialized;

    assertEquals(initEx.getMessage(), desrEx.getMessage());
    assertEquals(initEx.getCause().getMessage(), desrEx.getCause().getMessage());
}
项目:JAVA_UNIT    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:openjdk-jdk7u-jdk    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:freeVM    文件:ServerCloneExceptionTest.java   
/**
 * Sets up the fixture, for example, open a network connection. This method
 * is called before a test is executed.
 */
@Override
protected void setUp() {
    errorMessage = "Clone Error";
    causeMessage = "Caused Exception";
    cause = new ServerCloneException(causeMessage);
}
项目:freeVM    文件:ServerCloneExceptionTest.java   
/**
 * @tests java.rmi.server.ServerCloneException#ServerCloneException(String)
 */
public void test_Constructor_String() {
    ServerCloneException e = new ServerCloneException(errorMessage);
    assertEquals(errorMessage, e.getMessage());
    assertNull(e.detail);
    try {
        e.initCause(e);
        fail("No expected IllegalStateException");
    } catch (IllegalStateException exception) {
        // expected
    }
}
项目:freeVM    文件:ServerCloneExceptionTest.java   
public void assertDeserialized(Serializable initial,
        Serializable deserialized) {

    SerializationTest.THROWABLE_COMPARATOR.assertDeserialized(initial, deserialized);

    ServerCloneException initEx = (ServerCloneException) initial;
    ServerCloneException desrEx = (ServerCloneException) deserialized;

    assertEquals(initEx.getMessage(), desrEx.getMessage());
    assertEquals(initEx.getCause().getMessage(), desrEx.getCause().getMessage());
}
项目:openjdk-icedtea7    文件:Chaining.java   
public static void main(String[] args) throws Exception {
    Exception t = new RuntimeException();
    String foo = "foo";
    String fooMsg = "foo; nested exception is: \n\t" + t;
    test(new RemoteException(), null, null);
    test(new RemoteException(foo), foo, null);
    test(new RemoteException(foo, t), fooMsg, t);
    test(new ActivationException(), null, null);
    test(new ActivationException(foo), foo, null);
    test(new ActivationException(foo, t), fooMsg, t);
    test(new ServerCloneException(foo), foo, null);
    test(new ServerCloneException(foo, t), fooMsg, t);
}
项目:cn1    文件:ServerCloneExceptionTest.java   
/**
 * @tests java.rmi.server.ServerCloneException#ServerCloneException(String,Exception)
 */
public void test_Constructor_String_Exception() {
    ServerCloneException e = new ServerCloneException(errorMessage, cause);
    assertEquals(cause.getMessage(), e.getCause().getMessage());
    assertEquals(cause.getMessage(), e.detail.getMessage());
}
项目:cn1    文件:ServerCloneExceptionTest.java   
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new ServerCloneException(errorMessage, cause), comparator);
}
项目:cn1    文件:ServerCloneExceptionTest.java   
/**
 * @tests serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new ServerCloneException(errorMessage, cause), comparator);
}
项目:freeVM    文件:ServerCloneExceptionTest.java   
/**
 * @tests java.rmi.server.ServerCloneException#ServerCloneException(String,Exception)
 */
public void test_Constructor_String_Exception() {
    ServerCloneException e = new ServerCloneException(errorMessage, cause);
    assertEquals(cause.getMessage(), e.getCause().getMessage());
    assertEquals(cause.getMessage(), e.detail.getMessage());
}
项目:freeVM    文件:ServerCloneExceptionTest.java   
/**
 * @tests serialization/deserialization.
 */
public void testSerializationSelf() throws Exception {

    SerializationTest.verifySelf(new ServerCloneException(errorMessage, cause), comparator);
}
项目:freeVM    文件:ServerCloneExceptionTest.java   
/**
 * @tests serialization/deserialization compatibility with RI.
 */
public void testSerializationCompatibility() throws Exception {

    SerializationTest.verifyGolden(this, new ServerCloneException(errorMessage, cause), comparator);
}