Temporary workaround for Checkstyle bug
Attempting to name a variable in an "instanceof pattern" the same as a field results in a Checkstyle violation similar to the following if the "instanceof pattern matching" is located within a constructor. Reference to instance variable 'document' needs "this.". [RequireThis] See gh-28188
This commit is contained in:
parent
bbaf7578b2
commit
43dd813ee6
|
|
@ -50,8 +50,8 @@ class DomContentHandler implements ContentHandler {
|
|||
*/
|
||||
DomContentHandler(Node node) {
|
||||
this.node = node;
|
||||
if (node instanceof Document document) {
|
||||
this.document = document;
|
||||
if (node instanceof Document doc) {
|
||||
this.document = doc;
|
||||
}
|
||||
else {
|
||||
this.document = node.getOwnerDocument();
|
||||
|
|
|
|||
Loading…
Reference in New Issue