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
Assigned to: Chad Brandon
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
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642