Hi guys,
Earlier, it was possible to get CompositeDescriptor using a domain interface.
So, given -
public interface A
{
Property<String> name();
}
public interface AComposite extends A, EntityComposite
{
}
and AComposite.class registered with module.addComposites(...) call,
It was possible to do -
spi.getCompositeDescriptor( A.class, module )
(See CompositeEditPanel.getDisplayPropertyAccessor( Type type) for an example)
But now, this is causing a NPE. The stack trace is -
Exception in thread "main" java.lang.NullPointerException
at
org.qi4j.runtime.structure.ModuleInstance.findCompositeFor(ModuleInstance.java:199)
at
org.qi4j.runtime.Qi4jRuntime.getCompositeDescriptor(Qi4jRuntime.java:115)
at org.TestCase.<init>(TestCase.java:56)
at org.TestCase.main(TestCase.java:65)
This only happens if AComposite extends EntityComposite, and not if it
extends normal Composite.
So, it would appear that the problem is because of -
if( EntityComposite.class.isAssignableFrom( mixinType ) )
{
return ( (ModuleInstance) module ).findEntityCompositeFor(
mixinType );
}
return ( (ModuleInstance) module ).findCompositeFor( mixinType );
in the method Qi4jRuntime.getCompositeDescriptor( Class mixinType,
Module module )
and the fact that AComposite is now added with a module.addEntities(...) call.
Is this a bug?
- Sonny
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev