RFR: JDK-8267219: Javadoc method summary breaks when {@inheritDoc} from an empty parent [v2]
Hannes Wallnöfer
hannesw at openjdk.java.net
Tue May 18 16:42:46 UTC 2021
On Tue, 18 May 2021 13:52:25 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> liach has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
>
> As a matter of style, these days we avoid small files like `First.java` and `Second.java` and put the source instead in a text block in the main test file and write the file(s) on the fly, typically using `ToolBox.writeJavaFiles`. This makes it easier to read the test all at once, instead of switching between small files that are dominated by a legal header.
> Addressed both comments from @jonathan-gibbons and @hns.
>
> Turns out the `isValid` check is way better, though it took me a bit of time to debug because the row supplied to the table was wrapped in a `ContentBuilder`, which did not have a proper implementation of `isValid` (so when it has an invalid but non-empty content, it reports itself as valid)
Thanks @liach. I think I agree with your `ContentBuilder.isValid()` implementation, but this problem shows that the area is a bit of a mine field. It's very easy to have some content dropped silently because some `isValid()` implementation decided it was ok to do so. I'm not sure we need to be protected from ourselves in this way. Unfortunately, we rely on this mechanism quite heavily to suppress unwanted output. I think I want to spend a bit more time looking into this, although I think yours is the proper fix.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4066
More information about the javadoc-dev
mailing list