Commit 2a9e9f8
authored
Java 25 parser: don't merge
Per JEP 467, a blank line terminates a markdown doc comment, so two
`///` blocks separated by an empty line are distinct doc comments.
The merging code in `formatWithMarkdownJavaDoc` previously walked
backward across all consecutive `///` lines without checking the
inter-comment suffix, which interleaved their characters when re-printed.
Found while running `FindParseFailures` against `JabRef/jabref` for
#7554./// blocks across blank lines (#7556)1 parent ea81d80 commit 2a9e9f8
2 files changed
Lines changed: 21 additions & 0 deletions
File tree
- rewrite-java-25/src/main/java/org/openrewrite/java/isolated
- rewrite-java-tck/src/main/java/org/openrewrite/java/tree
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
2606 | 2607 | | |
2607 | 2608 | | |
2608 | 2609 | | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
2609 | 2615 | | |
2610 | 2616 | | |
2611 | 2617 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2989 | 2989 | | |
2990 | 2990 | | |
2991 | 2991 | | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
| 3001 | + | |
| 3002 | + | |
| 3003 | + | |
| 3004 | + | |
| 3005 | + | |
| 3006 | + | |
2992 | 3007 | | |
2993 | 3008 | | |
0 commit comments