When using Spring Retry @Recover method (which works ok) IntelliJ always marking method as unused and suggest to safe delete
@Recover
public void recover(RetryableException e, String param1) {
//recover
}
@Retryable(include = RetryableException.class, maxAttempts = 2)
public void retryable(String param1) {
//execute
throw new RetryableException();
}
Method 'recover(com.gth.common.exceptions.RetryableException, java.lang.String)' is never used
How can it be avoided? how can IntelliJ be aware of the recover method usage?
- I don't want IntelliJ to stop warn about
Unused declaration
, only the false positive warnings