If you pass an inner class to maybeRemoveImport
then imports of the outer class are not removed. Is this intended or could this be a helpful extension of the method?
An example: I have this code
import javax.ws.rs.core.Response;
public class TestController {
public void respond() {
System.out.println(Response.Status.NOT_FOUND);
}
}
If I apply the recipe ReplaceConstantWithAnotherConstant
to replace javax.ws.rs.core.Response$Status.NOT_FOUND
with org.springframework.http.HttpStatus.NOT_FOUND
then the import import javax.ws.rs.core.Response;
is not removed as maybeRemoveImport
is called with argument javax.ws.rs.core.Response$Status
.