Produces a false positive when using java17 and the jakarta-imports for injecting fields (jakarta.inject.Inject). Relevant sourcecode position to change might be
Probably just have to add the jakarta-inject-package to this list as well.
Example code:
import org.apache.struts.action.Action;
import jakarta.inject.Inject; // has been javax.inject.Inject before migration to 17
public class StartAction extends Action {
@Inject private Service injectedService;
}
This is a known issue for us, as we did not have the time yet to update all of the rules that were dealing with packages migrated from javax to jakarta.
The rule you mentioned is part of a list of rules that need to be updated in this way, you can follow this ticket to check the progress on it. (I have added this thread as a reference for S2226)