jakartaee / jakartaee/jaxb-api
generateIsSetMethod generates dangerous boolean code
@glassfishrobot is already working on this.
Since Sep 21, 2018.
- Dominant language
- Java
- Stars
- 79
- Forks
- 48
- Avg merge
- 7h 12m
- Merged PRs (30d)
- 2
Description
xjc generates code that does not properly autobox when 'generateIsSetMethod' is
used. I reported this for integers as issue 667, but that could be worked around
with an isSet method. However, booleans do not get an isSet method!
Generated code:
@XmlAttribute(name = "includeChildren")
protected Boolean includeChildren;
With generateIsSetMethod:
public boolean isIncludeChildren()
{ return includeChildren; }
Without:
public Boolean isIncludeChildren() { return includeChildren; }
#### Environment
Operating System: All
Platform: All
#### Affected Versions
[2.1.12]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.