You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2012/10/18 15:46:03 UTC

[jira] [Commented] (FELIX-3464) Raise exception when a Designate's OCDREF points to non-existing OCD

    [ https://issues.apache.org/jira/browse/FELIX-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479002#comment-13479002 ] 

Felix Meschberger commented on FELIX-3464:
------------------------------------------

I cannot see any documentation in the spec about what should happen if the OCDRef of the designate does not exist. But I agree this is not optimal.

I see two places, where we could hook in to verify:

(a) when parsing the metadata in The MetaDataReader
(b) when building the internal structures in the MetaTypeInformationImpl class (the addMetaData method which currently just ignores a Designate element whose ocdref does not point to an OCD.

While (a) would be correct if we only look at XML files, I think (b) would probably be more appropriate since this might be able to also see MetaTypeProvider services which provide ObjectClassDefinitions which may not be present in the XML files.

WDYT ?
                
> Raise exception when a Designate's OCDREF points to non-existing OCD
> --------------------------------------------------------------------
>
>                 Key: FELIX-3464
>                 URL: https://issues.apache.org/jira/browse/FELIX-3464
>             Project: Felix
>          Issue Type: Bug
>          Components: Metatype Service
>    Affects Versions: metatype-1.0.4
>            Reporter: Alexandre Castro Alves
>
> Currently, if a Designate's OCDREF references to a non-existing OCD, the MTI implementation simply ignores it.
> The result of this behavior is that the following code returns null both when (1) the designate ID is not defined in the meta-data, (2) the designate points to an invalid OCD:
> ObjectClassDefinition objClassDef = 
>             metaTypeInformation.getObjectClassDefinition(designateId, locale);
> It is my understanding from the spec that the latter situation should be treated as an exception.
> Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira