[ http://jira.andromda.org/browse/CORE-121?page=all ] Peter Friese resolved CORE-121: -------------------------------
Fix Version: 3.2 RC1 Resolution: Fixed Patch applied. Thanks, Lars! > MetafacadeBase and MetafacadeFactory seem to have a bug > ------------------------------------------------------- > > Key: CORE-121 > URL: http://jira.andromda.org/browse/CORE-121 > Project: AndroMDA Core > Type: Bug > Versions: 3.2 RC1 > Environment: Running AndroMDA via ANT. Model created in Borland Together and > exported through org.andromda.modules.xmilink. > Reporter: Lars Bilger > Assignee: Peter Friese > Fix For: 3.2 RC1 > Attachments: MetafacadeBasePatch.txt, MetafacadeFactoryPatch.txt > > Had a problem where builds would sometimes fail and sometimes succeed, > seemingly at random. Found out that it depends on the input model - the > xmilink exporter writes the model elements into the xmi in a different order > with every export, but this shouldn't be an issue. > The root reasons for the failures were NullPointerExceptions occuring in > various locations in the code, one of them being > MetafacadeBase.shieldedElement(). Browsing through the code, I found another > bit of code that caught my eye in MetafacadeFactory.getMetafacade(). > The reason I'm filing this as a bug is that I didn't have any of the above > problems since I changed it, although I don't quite understand what's > happening here. > As stated in http://galaxy.andromda.org/forum/viewtopic.php?t=2251, I > introduced a condition checking for null in the shieldedElement method to > avoid the NullPointerExceptions. > I also changed the metafacadesInCreation mechanism in the getMetafacade > method to use both the mappingObject and the requested metafacadeClass as key > for the metafacadesInCreation map. > Note that in the supplied patches I did that by putting both into an > ArrayList and using that as key, which might not be the most elegant way to > do it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642