- status: open --> in-progress
- assigned_to: Andreas Dangel
- Milestone: New Tickets --> PMD-5.0.5
Hi,
I use PMD to analyse JavaScript.
If node is an instance of net.sourceforge.pmd.lang.ecmascript.ast.ASTElementGet then:
1) node.getTarget() generates this exception:
java.lang.ClassCastException: org.mozilla.javascript.ast.Name cannot be cast to net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptNode
at net.sourceforge.pmd.lang.ecmascript.ast.ASTElementGet.getTarget(ASTElementGet.java:22)
2) node.getElement() generates this exception:
java.lang.ClassCastException: org.mozilla.javascript.ast.InfixExpression cannot be cast to net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptNode
at net.sourceforge.pmd.lang.ecmascript.ast.ASTElementGet.getElement(ASTElementGet.java:26)
Tested with PMD 5.0.3 (but source code in PMD 5.0.4 is the same ;-)
Regards.