diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java index 7bddc4f9ea..4b6f7f077f 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/xpath/internal/AstAttributeNode.java @@ -68,8 +68,8 @@ class AstAttributeNode extends BaseNodeInfo implements SiblingCountingNode { @Override public AtomicSequence atomize() { + getTreeInfo().getLogger().recordUsageOf(attribute); if (value == null) { - getTreeInfo().getLogger().recordUsageOf(attribute); value = DomainConversion.convert(attribute.getValue()); } return value;