Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] XmlElementDefinitionByReference NPE

Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=345632

On Thu, May 12, 2011 at 12:38 PM, Konstantin Komissarchik <konstantin.komissarchik@xxxxxxxxxx> wrote:

Greg,

 

Please open a bug.

 

Ling,

 

Is this related to you recent work in schema handling?

 

- Konstantin

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Thursday, May 12, 2011 10:26 AM
To: Sapphire project
Subject: [sapphire-dev] XmlElementDefinitionByReference NPE

 

Hey guys,

 

With my sapphire model that I've been using for several weeks all of a sudden (with latest updates) stopped working when trying to add a particular child element.  Not every child element fails to be able to be inserted but sometimes I get a NPE down in XmlElementDefinitionByReference.  here is where I'm seeing it:

 

line 92
final XmlElementDefinition definition = getSchema().getElement(getName().getLocalPart());

 

This is sometimes returning a null value and the very next line will throw the NPE and this prevents the new child node from being added in the masterDetail page:

if (definition.isAbstract()) {

 

When I change this to add a null check everything seems to work ok.  Sapphire is able to insert the new child element in the UI and in the source.

if (definition != null && definition.isAbstract()) {

 

 

Any thoughts?


--
Greg Amerson
Liferay, Inc.


_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev




--
Greg Amerson
Liferay, Inc.

Back to the top