Closed jkschneider closed 2 years ago
@jkschneider I was not able to reproduce this issue via unit tests; however, the code should have been using TypeUtils.
The original code had a null check on MethodType
and MethodType.DeclaringType
is a non-null attribute, I am thinking its either an issue with the AST or the stack trace is not associated with the correct element. The project was a bit challenging to build locally, I just updated the recipe so we can re-test on the SaaS.
String declaringType = mi.getMethodType() != null ? mi.getMethodType().getDeclaringType().getFullyQualifiedName() : null;
if ("org.junit.rules.TemporaryFolder".equals(declaringType) && mi.getSelect() != null)
fixed in: 37fb56a149a25a2f45192688df699a93700ce8c2
Problem
Expected behavior
Example diff
Recipes in example diff:
References:
undefined