Michiel van der Wulp a écrit : > Hi Matieu, > >> When you generate a class that is in a package with an empty name it >> raise a NullPointerException. >> So I fix it in GeneratorJava but I think the best is to provide a >> default value(empty string) to the >> name of a package. > > 1. Your fix for the GeneratorJava is very welcome, but would you please > create an issue for this bug and attach a patch to it? Especially since > we are in transition from CVS to SVN now. > > 2. In the GeneratorJava code, you can not presume that every package has > a name, even if you create one in ArgoUML every time the user creates a > package. > This since the model data may also have been imported as XMI without a > name set, and we want to be able to export the same XMI, i.e. still > without name. > IIRC, then a class without name is ignored when generating code, i.e. it > does not appear in the UI for selection. You may extend this behaviour > to exclude the contents of unnamed packages... this is the best solution > IMHO. > > PS: I checked the XMI file for an unnamed package containing an unnamed > class. And strangely enough, the class has a name = '' and the package > does not. > So, I presume that you may have a similar exception in generating code > when you import a handcrafted XMI in which you removed the name of a > class - this is something worth testing. > > Regards, > Michiel > >
Thanks, I have made a report: http://argouml.tigris.org/issues/show_bug.cgi?id=4460 I think NullPointerException are very bad. It should be avoid even if data come out with empty tag. But I don't know how you store your XMI. Math ___________________________________________________________________________ Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. http://fr.answers.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
