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)`.

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

Commit messages:
 - JDK-8267394: Do not rely on object identity for empty valid Content instance

Changes: https://git.openjdk.java.net/jdk/pull/4130/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4130&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267394
  Stats: 37 lines in 8 files changed: 19 ins; 9 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4130.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4130/head:pull/4130

PR: https://git.openjdk.java.net/jdk/pull/4130

Reply via email to