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
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.8/455 - Release Date: 22/09/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]