[ http://issues.apache.org/jira/browse/JAXME-50?page=all ]
Nacho G. Mac Dowell updated JAXME-50:
-------------------------------------
Attachment: isSet.xsd
This is a similar schema (it's actually a reduced version of Geert's) with the
same problem. The problem is with JAXBPropertySG. It can be solved with the
following on line 87:
- fieldName = "_" + propertyName;
+ fieldName = propertyName;
The thing is that I am not sure if you want the fieldName to have the '_' in
front or not.
> The generation of isSet methods generates wrong code
> ----------------------------------------------------
>
> Key: JAXME-50
> URL: http://issues.apache.org/jira/browse/JAXME-50
> Project: JaxMe
> Type: Bug
> Components: JaxMe Core
> Versions: current (nightly)
> Reporter: Nacho G. Mac Dowell
> Priority: Minor
> Attachments: isSet.xsd, issetbug.xsd
>
> Geert Barentsen wrote:
> The generation of isSet methods (<jaxb:globalBindings
> generateIsSetMethod="true" />) seems to be wrong in nested classes because of
> an extra underscore. Below is a short example of wrongly generated code: both
> "_period" and "period" are used as a member. Any thoughts?
> public class VisualTypeImpl implements net.imo.www.VisualType {
> public static class PeriodlistTypeImpl implements
> net.imo.www.VisualType.PeriodlistType {
> private java.util.List period = new java.util.ArrayList();
> public java.util.List getPeriod() {
> return period;
> }
> public boolean isSetPeriod() {
> return (_period != null);
> }
> }
> ...
> }
> Generated from:
> <xsd:complexType name="VisualType">
> <xsd:all>
> <xsd:element name="periodlist" minOccurs="1" maxOccurs="1">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="period" type="VisualPeriodType"
> minOccurs="1" maxOccurs="unbounded" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:all>
> ...
> </xsd:complexType>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
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]