hi martin,
i do also have a problem when running the testcases from command line (ant junit) but i cannot reproduce this behaviour within eclipse ?
i ran SwizzleTests without any errors or failures within eclipse. pg.getAllArticlesInGroup() is always a vector:
...
tx = _kit.getTransaction(_conn);
tx.begin();
pg = (ProductGroup) _conn.getObjectByIdentity(pgOid);
pg.getAllArticlesInGroup().clear(); <<< it's a Vector !?
tx.commit();tx = _kit.getTransaction(_conn);
tx.begin();
pg = (ProductGroup) _conn.getObjectByIdentity(pgOid);
assertEquals("should be equal", 0, pg.getAllArticlesInGroup().size()); <<< it's a Vector !?
tx.commit();
...
jakob
Jakob Braeuchi schrieb:
hi martin,
i ran the test on it's own and on an initially loaded db.
jakob
Martin Kal�n schrieb:
Jakob Braeuchi wrote:
i have a printout of your original post here; but i do not have a problem ;)
Weirdness... Strange that both Brian and I get this fault and you don't. I will re-run the tests and do some more checking using different db:s.
After 1.0.2 release though, since I've seen this before and know it's no new regression.
> pg.getAllArticlesInGroup() returns a Vector not a RAC.
Weirdness once again - I clearly got a RAC as return object. I was even single-stepping through calls into RAC in my debugger.
btw. Vector#clear() calls removeAllElements.
OK good, so then my thread regarding RAC is a no-issue.
Hmm... just checked the JavaDoc at http://java.sun.com/j2se/1.3/docs/api/java/util/Vector.html#clear() and http://java.sun.com/j2se/1.3/docs/api/java/util/Vector.html#removeAllElements(), and it seems that there is no guarantee for this, if you run on different JVM implementations.
To rename the RAC-internal clear code to clear() and call this from removeAllElements() would be the safest bet. But since you have refactored things anyway in CVS trunk this might not be applicable at all anymore?
Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
