AssertTrueInstanceofToAssertInstanceOf should add the required import statement
I applied the rule, but get following compiler output:
> Task :compileTestJava
/home/runner/work/jabref/jabref/src/test/java/org/jabref/logic/bst/BstVMVisitorTest.java:241: error: cannot find symbol
assertInstanceOf(ParseTree.class, vm.getStack().pop());
^
symbol: method assertInstanceOf(Class<ParseTree>,Object)
My expection: The code generated by OpenRewrite compiles. It is OK, if the code does not meet checkstyle requirements (import order), but at least it should compile.
(Internal build: https://github.com/JabRef/jabref/actions/runs/6107579864)
@AlekSimpson Is this something you can take on?
What's curious is that we do already add the import; could there be missing type information here? If so we might want to add a precondition that there's no missing type information.
Ya I can take this on
It looks like the example here in https://github.com/JabRef/jabref/blob/22131c95a3af861f3d86daa448eb16ec1a14462e/src/test/java/org/jabref/logic/bst/BstVMVisitorTest.java#L242 has since been fixed manually in https://github.com/JabRef/jabref/commit/b3372fa894fbceb09fe28838a7db81748bef9e6f#diff-a4b5b4999b2f534c5380ab82041f79d16eee3e00da40d9333627c523c8835c76 I don't see any reason why that would have failed at the time. :/