Please review a simple fix for an NPE in doclint, in JDK 17.

The NPE is caused by checking if an unknown tag is self-closing. The fix is to 
move the check into the arm of the preceding `if` statement that ensures that 
the tags is not null.   Effectively, we do not valid whether unknown tags may 
be self-closing.

The potential for the NPE has been there a long time. The check that triggers 
the NPE became more likely when we removed support for HTML4.

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

Commit messages:
 - JDK-8264843: Javac crashes with NullPointerException when finding unencoded 
XML in <pre> tag

Changes: https://git.openjdk.java.net/jdk17/pull/86/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=86&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8264843
  Stats: 32 lines in 3 files changed: 28 ins; 1 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/86.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/86/head:pull/86

PR: https://git.openjdk.java.net/jdk17/pull/86

Reply via email to