Document Checkstyle issue regarding instanceof pattern variables

See https://github.com/checkstyle/checkstyle/issues/10969
This commit is contained in:
Sam Brannen 2022-05-30 19:57:20 +02:00
parent 16f65e59b4
commit b79f981510
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ class DomContentHandler implements ContentHandler {
*/
DomContentHandler(Node node) {
this.node = node;
// The following pattern variable "doc" cannot be named "document" due to lacking
// support in Checkstyle: https://github.com/checkstyle/checkstyle/issues/10969
if (node instanceof Document doc) {
this.document = doc;
}