Dhairya-007 opened a new pull request, #31070:
URL: https://github.com/apache/camel/pull/31070

   # Rationale for this change
   
   [CAMEL-21356](https://issues.apache.org/jira/browse/CAMEL-21356) is about 
re-enabling doclint: it is currently switched off in two places in the root 
`pom.xml` (`<doclint>none</doclint>`), and the Javadoc problems it would report 
have to be cleared first.
   
   `camel-xml-io-util` accounts for 21 of those reports, all one pattern. These 
classes close a Javadoc description with a `<p>` that has nothing after it, 
just before the tag block:
   
   ```java
   /**
    * Creates a Reader for a File.
    * <p>
    * It looks for the UTF-8 BOM first, if none sniffs the XML prolog charset, 
if this is also missing defaults to
    * UTF-8.
    * <p>
    * It does a lenient charset encoding detection, check the constructor with 
the lenient parameter for details.
    * <p>          <-- opens a paragraph that never gets content
    *
    * @param  file        File to create a Reader from.
    * @throws IOException thrown if there is a problem reading the file.
    */
   ```
   
   doclint reports each as `warning: empty <p> tag`. The rendered Javadoc gains 
a stray empty paragraph before the parameter table.
   
   ## What changed
   
   Only the dangling `<p>` lines are removed — the ones where the next 
meaningful line is a `@`-tag or the end of the comment. Every `<p>` that 
actually separates two paragraphs of prose is left alone: of the 65 `<p>`-only 
lines in `XmlStreamReader` just 13 were dangling, and 8 of 11 in 
`XmlStreamReaderException`. 21 lines deleted, nothing else touched.
   
   No prose was reworded and no code was touched, so there is nothing to change 
in behaviour.
   
   ## Are these changes tested?
   
   Javadoc generation on the module, on JDK 21, with the linting that the 
ticket wants switched back on:
   
   ```console
   # before
   $ ./mvnw -pl core/camel-xml-io-util javadoc:javadoc \
       -DadditionalJOption=-Xdoclint:all,-missing
   XmlStreamReader.java:109: warning: empty <p> tag
   XmlStreamReader.java:124: warning: empty <p> tag
   ...
   XmlStreamReaderException.java:155: warning: empty <p> tag
   21 findings
   
   # after
   $ ./mvnw -pl core/camel-xml-io-util javadoc:javadoc \
       -DadditionalJOption=-Xdoclint:all,-missing
   0 findings
   BUILD SUCCESS
   ```
   
   The count of removed lines (13 + 8) matches the number of findings exactly, 
so no reported case is left and no unreported `<p>` was removed.
   
   This does not resolve CAMEL-21356 — doclint is still off, and other modules 
still report. It clears one module. I checked the rest of `core/`: the only 
other finding there is `MimeTypeHelper` in `camel-util`, which uses the HTML4 
`<tt>` tag; that is a different fix and I will send it separately rather than 
mixing two defect classes in one PR.
   
   ## Are there any user-facing changes?
   
   Only that the generated Javadoc for these two classes no longer has an empty 
paragraph before the parameter table.
   
   ## Note on the JIRA ticket
   
   CAMEL-21356 is Open and unassigned. `CLAUDE.md` asks an agent to assign the 
ticket and move it to In Progress before starting; I could not, having no ASF 
JIRA account. Please leave the ticket open — this is one module of several.
   
   ---
   
   _Claude Code on behalf of Dhairya-007_
   


-- 
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]

Reply via email to