Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge branch 'npe_in_meta' into 'ibm-trunk'
Npe in meta See merge request !55
- Loading branch information
Showing
3 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,18 @@ | ||
package org.apache.yoko; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class MetaTest extends AbstractOrbTestBase { | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
super.setUp(); | ||
setWaitForFile("Test.ref"); | ||
} | ||
|
||
@Test | ||
public void testMeta() throws Exception { | ||
client.invokeMain("test.meta.TestMeta"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,31 @@ | ||
package test.meta; | ||
|
||
import java.io.Serializable; | ||
|
||
import javax.rmi.CORBA.Util; | ||
import javax.rmi.CORBA.ValueHandler; | ||
|
||
import org.junit.Assert; | ||
import org.omg.CORBA.ValueDefPackage.FullValueDescription; | ||
import org.omg.SendingContext.CodeBase; | ||
|
||
public class TestMeta { | ||
|
||
public static void main(String[] args) throws Exception { | ||
testMeta(); | ||
} | ||
|
||
public static void testMeta() throws Exception { | ||
ValueHandler vh = Util.createValueHandler(); | ||
CodeBase codebase = (CodeBase)vh.getRunTimeCodeBase(); | ||
String dataClassRepid = vh.getRMIRepositoryID(Data.class); | ||
FullValueDescription fvd = codebase.meta(dataClassRepid); | ||
Assert.assertNotNull(fvd); | ||
} | ||
|
||
public static class Data implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
public Data d; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters