users@jaxb.java.net

Re: automaticNameConflictResolution and -XautoNameResolution

From: Iaroslav Savytskyi <iaroslav.savytskyi_at_oracle.com>
Date: Tue, 10 Sep 2013 14:10:28 +0200

Hi, Gary,

 From what you have written I would suggest it's a bug. Can you please
fill it in JIRA [1]. And send me [2] simple test case so I'll attach it
to the filled bug.

Thanks.

1: https://java.net/jira/browse/JAXB
2: iaroslav.savytskyi at oracle.com

--
Best regards,
Iaroslav
On 28/08/13 00:36, BELLO, GARY (GARY) wrote:
> \com\sun\tools\xjc\Options.java has field automaticNameConflictResolution that can be set true when "-XautoNameResolution" is passed as command line arg to XJCTask or XJCTask2.
> I see in debugger conflicted names getting a '2' appended at their end.
> But I get exceptions after com.sun.tools.xjc.model.CElementInfo.getSqueezedName(CElementInfo.java:254) returns the same name already used.
> At com.sun.tools.xjc.generator.bean.ObjectFactoryGeneratorImpl.populate(ObjectFactoryGeneratorImpl.java:191) a collision is detected. My elementFactoryNames map has 4 members and the CElementInfo ei trying to be added has an ei.getSqueezedName() == "GetFullDataRetrievalResponse" matching one in the map - but that ei also has an ei.type.fullName() value of  "javax.xml.bind.JAXBElement<com.att.felix.ccrt.GetFullDataRetrievalResponse2>" so this element got a modified name due to automaticNameConflictResolution boolean.
> Is there a bug or incomplete support of -XautoNameResolution at this time ?
> I am working with jaxb ri 2.2.7 sources .
> Thanks
> -Gary
>
>
>