Fix #364: render parameter notes correctly in HtmlRender

IN
9h ago
+114-2

Fixes #364.

Problem

The Notes row for a changed parameter in the HTML report was built from the same parameter object on both sides (the original report in #364), so the struck-through old notes always showed the new description. That one-liner was corrected by #547, but the issue stayed open because the fix never referenced it, and the row still had a defect on the same lines: it inserted the raw description values without a null guard. When a parameter gains a description it did not have before, j2html renders the null value as the literal text null, producing <del class="comment">null</del> change into <span class="comment">new description</span>.

Fix

Guard both values in li_changedParam exactly like the neighboring li_addParam, li_missingParam and li_deprecatedParam rows do: emit an empty element when a description is absent.

Verification

  • Added issue-364-param-notes-1.json / issue-364-param-notes-2.json where one parameter changes its description and another gains one.
  • New regression tests in HtmlRenderTest assert the old description is struck through (<del class="comment">Number of pets returned</del>), the new one is shown next to it, and no null text appears when a parameter gains notes.
  • mvnw -pl core,cli test: build success, all tests pass.

Note: #937 also touches HtmlRender.java (operation Description section around line 203 and a new helper at the end of the file); this change is in the li_changedParam Notes branch (around line 561) and does not overlap those hunks.

Signed-off-by: Inf1mum vadimlazuk5@gmail.com


Summary by cubic

Fixes rendering of parameter notes in the HTML report so changed parameters show the correct old and new descriptions, and no literal null text appears when a parameter gains a description.

  • Guards both old and new description values in li_changedParam the same way neighboring rows do, emitting an empty element when a description is absent.
  • Adds regression tests covering a changed description and a newly added description.