I’m encountering a false positive warning in my MyBatis-Plus ServiceImpl class. The warning appears on the page method override, even though the implementation is correct.
Code example:
@Override
public Page<DeviceCategory> page(QueryPage page, DeviceCategoryQueryReq query) {
return this.page(page, this.combineQuery(query));
}
The class structure:
- My service interface extends
IService<T>
- My implementation class extends
BaseDAO<Mapper, Entity>
and implements the service interface - The
page
method is correctly implemented according to the interface contract
The warning suggests there’s an issue with the method override, but:
- The method signature matches the interface
- The generic types are correct
- The code works correctly at runtime
- This is a common pattern in MyBatis-Plus applications
Has anyone else encountered this issue? Is there a way to properly suppress this warning without using @SuppressWarnings?
Environment:
- MyBatis-Plus 3.5.2
- Java 8
- Cursor IDE