[
https://issues.apache.org/jira/browse/MJAVADOC-559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16730944#comment-16730944
]
Robert Scholte commented on MJAVADOC-559:
-----------------------------------------
I don't want to use the patch of MJAVADOC-452, it has been partially added and
it is missing testcases to verify the result. Better to create a new patch
including such a testcase.
> Extra duplicate "throws" tags added to methods with same names
> --------------------------------------------------------------
>
> Key: MJAVADOC-559
> URL: https://issues.apache.org/jira/browse/MJAVADOC-559
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Components: fix
> Affects Versions: 2.10.4, 3.0.1
> Reporter: Richard Sand
> Priority: Major
>
> This was one of the bugs I'd submitted a patch for in MJAVADOC-452. In that
> patch I had added a change buffer so that the javadoc output for each method
> would be queued up, stripped of duplicates, and sorted before writing. I
> think we still need that logic. Consider the class below, where i have a
> method getFirstValue and two methods getFirstValueAsInt. The latter both have
> a proper declaration of throws NFE, but then each gets an extra declaration
> at the end of the javadoc block. I ran this test using the MJAVADOC-452
> branch:
> {code}
> /**
> * Method getFirstValue.
> *
> * @param key
> * String
> * @param defaultValue
> * a {@link java.lang.String} object.
> * @return String
> * @since 2.7.3
> */
> public String getFirstValue(String key, String defaultValue) {
> ...
> }
> /**
> * Method getFirstValueAsInt.
> *
> * @param key
> * String
> * @return int
> * @throws java.lang.NumberFormatException
> * if the value is not an integer
> * @since 3.0
> * @throws java.lang.NumberFormatException if any.
> */
> public int getFirstValueAsInt(String key) throws NumberFormatException {
> ...
> }
> /**
> * NOTE: this method returns the defaultValue if the stored value is null
> <em>OR</em> an empty string
> *
> * @param key
> * String
> * @param defaultValue
> * a int.
> * @return int
> * @throws java.lang.NumberFormatException
> * if the value is not an integer
> * @since 3.0
> * @throws java.lang.NumberFormatException if any.
> */
> public int getFirstValueAsInt(String key, int defaultValue) throws
> NumberFormatException {
> ...
> }
> {code}
> Robert would you like me to create a patch for this or to do it yourself? If
> you could merge the 452 branch into master I can do a pull from master. Or I
> could pull from 452. Let me know if you'd like some help here. Thanks!
>
> Best regards,
> Richard
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)