[
http://issues.ops4j.org/jira/browse/QI-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_11454
]
Sonny Gill commented on QI-72:
------------------------------
This only happens if AComposite extends EntityComposite, and not if it extends
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.
> Qi4jRuntime.getCompositeDescriptor() causes NPE when called with the domain
> interface for an EntityComposite
> ------------------------------------------------------------------------------------------------------------
>
> Key: QI-72
> URL: http://issues.ops4j.org/jira/browse/QI-72
> Project: Qi4j
> Issue Type: Bug
> Components: Core Runtime
> Affects Versions: 0.3
> Reporter: Sonny Gill
> Assignee: Rickard Öberg
>
> Given -
> public interface A
> {
> Property<String> name();
> }
> public interface AComposite extends A, EntityComposite
> {
> }
> and, AComposite.class registered using module.addEntities(...)
> Calling spi.getCompositeDescriptor( A.class, module ) causes a NPE, with
> stack trace -
> 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)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.ops4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev