Is the testcase ProxyExamples#testReferenceProxyWithInheritance a known failure on the 1.0.x branch at the moment?
I'm currently looking into a fix for dynamic proxies when using per-thread metadata profiles - a follow-up on a fix I did for CollectionProxy-instances a long time ago, see: http://mail-archives.apache.org/mod_mbox/db-ojb-dev/200410.mbox/[EMAIL PROTECTED] I have not actually tried to rollback my changes and see if they are responsible but the are so isolated to per-thread mode so I am pretty sure they are not... testReferenceProxyWithInheritance fails because the proxied unloaded instances are only instanceof Ownable, not the specific instanceof checked by the following asserts in the testcase: 325:assertTrue(owned1 instanceof Ownable2); 326:assertTrue(owned2 instanceof Ownable1); There is a comment in the testcase: 323:// This should be true according the docs of class Proxy and because 324:// the concrete classes are Onwable2Impl/Onwable1Impl However, are not the comments and asserts wrong? The proxies are instanceof Ownable until they are materialized, when the instances are indeed instanceof the more specific interfaces. If I change the testcase lines 325-326 to this: assertTrue(owned1 instanceof Ownable); assertTrue(owned2 instanceof Ownable); assertTrue(ProxyHelper.getRealObject(owned1) instanceof Ownable2); assertTrue(ProxyHelper.getRealObject(owned2) instanceof Ownable1); ...it passes. Any comments on this? I am thinking wrong and the old testcase code correct? (In that case something in proxy generation code needs to be fixed, since the test currently fails.) Regards, Martin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
