20772078207920802081208220832084208520862087
assertEquals(any1, any2); assertEquals(any2, any1); any1.insert_Object(server); any2.insert_Object(server); assertEquals(any1, any2); assertEquals(any2, any1); any1.insert_Object(null, AnyServerHelper.type());
817818819820821822823824825826827
public void test_object() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server); assertEquals(server, outAny.extract_Object()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references
843844845846847848849850851852853
public void test_object2() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server, AnyServerHelper.type()); assertEquals(server, outAny.extract_Object()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references
855856857858859860861862863864865
} public void test_extract_objref() { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server, AnyServerHelper.type()); assertEquals(server, ((org.jacorb.orb.Any)outAny).extract_objref()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references
868869870871872873874875876877878
public void test_object_null() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(null); assertNull(outAny.extract_Object()); Any inAny = server.bounce_any(outAny); assertTrue(outAny.equal(inAny));
326327328329330331332333334335336
// Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb));
17181920212223242526
public Any roundtripany(Any a) { Any any = org.omg.CORBA.ORB.init().create_any(); any.insert_Object(a.extract_Object(), a.type()); return any; } }
126127128129130131132133134135136
Client c = new Client(); poa.activate_object(c); /* insert an untyped reference */ a.insert_Object(c._this_object()); System.out.println( "Output of generic: " + s.generic( a ) ); incr(1); System.out.print("Passing object again");
803804805806807808809810811812813
@Test public void test_object() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server); assertEquals(server, outAny.extract_Object()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references
831832833834835836837838839840841
@Test public void test_object2() throws Exception { Any outAny = setup.getClientOrb().create_any(); outAny.insert_Object(server, AnyServerHelper.type()); assertEquals(server, outAny.extract_Object()); Any inAny = server.bounce_any(outAny); //can't readily test equality of object references