persistence@glassfish.java.net

Fixing issue #383

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Tue, 14 Mar 2006 18:53:41 -0800

Tom,

The NPE is caused by the following code
m_session.getProject().getAliasDescriptors().remove("");

When there are no entities in the PU, the alias descriptors
hashtable is null because it's never created.

There are 2 options to fix it:
a) change the line above to
Hashtable d = m_session.getProject().getAliasDescriptors();
if (d != null)
        d.remove("");

b) Change the Project class to create aliasDescriptors in the
constructor.

If you don't see a problem with ether fix, I can make the change.

regards,
-marina