Switch && to || to prevent a ClassCastException in the case that the parent node is not a ProvidesDirective.
How to test
Set a debug point before the line that was changed, and modify the AST so that the parent node is not a ProvidesDirective. The method should return on the line after the line that was changed.
I don't have a method to reproduce this without modifying variables in memory, since the bug relies on a faulty error range or AST being generated by the compiler.
Fixes #1598
What it does
Switch
&&
to||
to prevent aClassCastException
in the case that the parent node is not aProvidesDirective
.How to test
Set a debug point before the line that was changed, and modify the AST so that the parent node is not a
ProvidesDirective
. The method should return on the line after the line that was changed.I don't have a method to reproduce this without modifying variables in memory, since the bug relies on a faulty error range or AST being generated by the compiler.
Author checklist