How to resolve the following warning from the quarkus maven plugin?
Found unrecommended usage of private members (use package-private instead) in application beans
My code looks like this:
@Mapper(componentModel = "cdi", uses = SampleFactory.class)
public interface SampleMapper {
// mapping functions
}
The generated Impl class looks like this:
@ApplicationScoped
public class SampleMapperImpl implements SampleMapper {
@Inject
private SampleFactory sampleFactory;
// mapping functions
}
The warning suggests to make the sampleFactory member package-private. Is there a possiblity to configures this, e.g. with an annotation? The current mapstruct (1.4.2) documentation states you can only configure an injection strategy. However, configuring the visibility of the injected member is not possible - is it?
Settings:
- quarkus-maven-plugin:1.12.1
- mapstruct 1.4.2.Final
- Java 14.0.1