On Thu, 20 May 2021 14:31:33 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:
> This is a simple cleanup to replace the sentinel `HtmlTree.EMPTY` text > constant with an instance that achieves the same by overriding `isValid()`. I > think this is the nicer solution, and it allows us to remove the special case > identity check in `HtmlTree.add(Content)`. I agree with Jon on that this change should be tested thoroughly. I recommend that you compare outputs of JDK API documentation in addition to running usual tier1 tests. That said, I think I understand what you are trying to achieve with this change: it might be useful to have that "special empty" behavior implemented in a more versatile way which allows both structured and OOP treatment. ------------- PR: https://git.openjdk.java.net/jdk/pull/4130