mirror of https://github.com/apache/openjpa.git
Added extra debugging logic to make sure the default company model deserailizes from the companies.xml file.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@505825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ecf428bd69
commit
7d0839f9ff
|
@ -180,9 +180,19 @@ public abstract class CompanyModelTest extends SingleEMTest {
|
||||||
// the classes statically
|
// the classes statically
|
||||||
factoryClasses = impls;
|
factoryClasses = impls;
|
||||||
try {
|
try {
|
||||||
Collection obs = (Collection) new XMLDecoder
|
final List<Exception> exceptions = new LinkedList<Exception>();
|
||||||
(CompanyModelTest.class.
|
XMLDecoder decoder = new XMLDecoder(CompanyModelTest.class.
|
||||||
getResourceAsStream("companies.xml")).readObject();
|
getResourceAsStream("companies.xml"));
|
||||||
|
decoder.setExceptionListener(new ExceptionListener() {
|
||||||
|
public void exceptionThrown(Exception e) {
|
||||||
|
exceptions.add(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Collection obs = (Collection) decoder.readObject();
|
||||||
|
|
||||||
|
if (exceptions.size() > 0) {
|
||||||
|
throw new IllegalStateException(exceptions.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
assertNotNull(obs);
|
assertNotNull(obs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue