[
https://issues.apache.org/jira/browse/XMLSCHEMA-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Repchevsky updated XMLSCHEMA-11:
---------------------------------------
Attachment: fnroyOcPjyUAAAAASUVORK5CYII=
I am not sure this is a good idea for the 2.0 version... :-(
XmlSchemaObject is an abstract class so changing
XmlSchemaChoice.getItems() return type may break compatibility.
I would prefer to make XmlSchemaChoiceMember inherit XmlSchemaObjectBase
now and leave
public List<XmlSchemaChoiceMember> getItems() for future.
Probably it is possible to trick with generics:
public <T extends XmlSchemaObjectBase> List<T> getItems()
this way both would work:
List<XmlSchemaChoiceMember> members = choice.getItems();
List<XmlSchemaObject> objects = choice.getItems();
Kind regards,
Dmitry
--
------------------------------------------------------------------------
Barcelona Supercomputing Center National Institute of Bioinformatics,
Life Science, Computational Node 6
Nexus II, Jordi Girona 29, 08034 Barcelona, Spain
> XmlSchemaChoice.getItems() should probably return XmlSchemaChoiceMember
> instead of XmlSchemaObject.
> ---------------------------------------------------------------------------------------------------
>
> Key: XMLSCHEMA-11
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-11
> Project: XmlSchema
> Issue Type: Question
> Affects Versions: XmlSchema 2.0
> Environment: Java :-)
> Reporter: Dmitry Repchevsky
> Priority: Trivial
> Labels: API, changes
> Attachments: fnroyOcPjyUAAAAASUVORK5CYII=
>
>
> XmlSchemaSequence.getItems() returns XmlSchemaSequenceMember. IMHO
> XmlSchemaChoice.getItems() should return XmlSchemaChoiceMember.
> Also XmlSchemaChoiceMember could inherit XmlSchemaObjectBase (as
> XmlSchemaSequenceMember does), so both XmlSchemaSequence.getItems() and
> XmlSchemaChoice.getItems() will return XmlSchemaObjectBase type that
> facilitates parsing.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]