jira-importer commented on issue #744: URL: https://github.com/apache/maven-javadoc-plugin/issues/744#issuecomment-2957349399
**[Richard Sand](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rsand)** commented Hi Robert, its a pain to split it up, is it ok if I walk through the changes in the patch file? Here is a description of every change by line # (the line # in the patch file that is): 17: added boolean config param "removeUnknownThrows" for removing unknown throws, default is false 30: added boolean config param "maven.javadoc.fix.skip" for skipping the fix goal, default is false 43: inside execute() method, added check for skip=true 57: in properties passed into CLIRR invocation, added "maven.javadoc.fix.skip=true" to prevent CLIRR from invoking fix and looping [I understand you don't like that, but it's simple and straightforward] 68: added capability to detect if any actual changes have been made to the contents of the file before saving - line 68 initializes a new BufferedReader for holding the contents for comparison 75: reads the output file into our BufferedReader 86: closes the new BufferedReader 101: changed the log message from "fixing" to "analyzing", since here we are only looking for fixes, later we will log if any fixes were performed 112: moved "String line" variable declaration into the loop itself 121: added a missing "close" 130: does a line-by-line comparison of the original content to the new content 136: added a log statement saying that we were saving changes to this file because changes were made 148: no code change here, just changed the formatting so each method was on its own line 169: moved "addMissingJavadocTags" above "updateJavadocTags" - this is because we added a new method "writeJavadocTags" which does the actual output, so addMissingJavadocTags doesn't actually output anything, it just adds the missing tags to the list 177: added writeJavadocTags 185: we are inside parseJavadocTags - we are now passing the javaEntityTags object into getJavadocComment 198: here instead of directly putting the throws tag into the javaEntityTags, we call fixThrowsTag 207-312: the method updateJavadocTags has been modified a fair amount. First, it has been renamed to writeJavadocTags - this method writes all of the tags provided, and uniformly ensures that every tag ends in an EOL with no extra whitespaces trailing. The main change is its handling specifically of methods comments. Here, it uses the javaEntityTags to find all of the tags it needs to write, since we have ensured that the javaEntityTags are populated with everything that the comment should have 314: the method writeParamTag is now passed in the 1 specific tag it is supposed to be writing, instead of the array of all parameters 318: removed call to fixQdox because that was called outside of writeParamTag 329: changed log message from "fixed unknown param" to "removed unknown param" to provide a clearer message 338: we renamed the method "writeThrowsTag" to "fixThrowsTag" because this method no longer writes any output, but just fixes the tag within the javaEntityTags. we added a new "writeThrowsTag" later to do the actual output writing 354: instead of writing the tag, put it into javaEntityTags 360-371: no code changes, just formatting 381-386: we don't output the tag, just update the String and put it back into the javaEntityTags 392: add check for "removeUnknownThrows" 394-396: updated log message to explicitly state that the throws is being ignored (removed) 399-405: updated log message to explicitly state that an unknown throws was found but is being included 409-441: new method "writeThrowsTag" which does the actual output 455-456: addMissingJavadocTags no longer needs a StringBuffer since it no longer does any output writing. Instead any changes it makes are added to the javaEntityTags 464-467: instead of writing to the output, we create a new javaEntityTags entry [java parameter] 475-478: instead of writing to the output, we create a new javaEntityTags entry [type parameter] 486-489: instead of writing to the output, we create a new javaEntityTags entry [return tag] 497-500: instead of writing to the output, we create a new javaEntityTags entry [throws tag] 508-511: instead of writing to the output, we create a new javaEntityTags entry [author tag] 515-518: instead of writing to the output, we create a new javaEntityTags entry [version tag] 526-529: instead of writing to the output, we create a new javaEntityTags entry [since tag, new class] 534-538: instead of writing to the output, we create a new javaEntityTags entry [since tag, existing class] 546-549: instead of writing to the output, we create a new javaEntityTags entry [since tag, new method] 557-560: instead of writing to the output, we create a new javaEntityTags entry [since tag, existing] 568: added missing close 578: added missing close 587-592: because we modified "getJavadocComment" to add the javaEntityTags parameter, specifically for dealing with method comments, we add this invocation with null for javaEntityTags to preserve existing invocations 600,605-606: here we add javaEntityTags to getJavadocComment, which allows us to make sure that the same parameter isn't output multiple times 614-624: here we make sure that the tag currently being processed hasn't already been added to the javaEntityTags 630-666: here we add the logic to make sure that two parameters with overlapping names don't conflict, e.g. "`@param` something" and `@param` "somethingelse", and if the same tag exists twice, e.g. "`@param` something", "`@param` something" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
