Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xjc-generated classes may have methods with missing @param or @return #1117

Closed
Tomas-Kraus opened this issue Jan 24, 2017 · 3 comments · Fixed by #1638
Closed

xjc-generated classes may have methods with missing @param or @return #1117

Tomas-Kraus opened this issue Jan 24, 2017 · 3 comments · Fixed by #1638

Comments

@Tomas-Kraus
Copy link
Member

Further to commit 0fd1c105c992f77da451e6eb4143617cf85b5fc3 that has this commit comment:

8158221: Added missing javadoc for method parameter and returned value.

(See https://bugs.openjdk.java.net/browse/JDK-8158221 for the report)

This commit doesn't go far enough; it applies only to the generated ObjectFactory.java.

Classes generated by xjc for the users's schema may have getter methods with Javadoc that omits @return, and setter methods with Javadoc that omits @param.

For example, here is the generated code for the getter and setter for a field of type int:

/**
     * Gets the value of the id property.
     *
     */
    public int getId() {
        return id;
    }

    /**
     * Sets the value of the id property.
     *
     */
    public void setId(int value) {
        this.id = value;
    }

Similarly, a generated getter for a value of List type has Javadoc that omits @return.

Its seems that within xjc/src/main/java/com/sun/tools/xjc/generator/bean/field, some of the classes invoke .javadoc().addReturn() and .javadoc().addParam(), and some don't ...

Affected Versions

[2.2.11]

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Reported by richardwalker

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAXB-1117

@Tomas-Kraus
Copy link
Member Author

lukasj added a commit to lukasj/jaxb-ri that referenced this issue May 17, 2022
…@param or @return

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
lukasj added a commit that referenced this issue May 17, 2022
…return

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants