RFR: 8332858: References with escapes have broken positions after they are transformed

Jan Lahoda jlahoda at openjdk.org
Fri May 24 09:10:11 UTC 2024


If the javadoc comment contains a (Markdown) link like:

[java.util.Arrays#asList(Object[])]


The transformer that converts this link into the Javadoc link will not find the reference, as it is looking for `java.util.Arrays#asList(Object[])` (note the missing escapes), which is not present in the original text.

This patch tries to fix that by permitting optional escapes for all escapable character when searching for the reference, in case the literal search fails. This is done using regexp, although could presumably be done using a manual search.

-------------

Commit messages:
 - Fixing prefix offset.
 - 8332858: References with escapes have broken positions after they are transformed

Changes: https://git.openjdk.org/jdk/pull/19387/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19387&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8332858
  Stats: 87 lines in 2 files changed: 81 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/19387.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19387/head:pull/19387

PR: https://git.openjdk.org/jdk/pull/19387


More information about the compiler-dev mailing list