79416675

Date: 2025-02-06 02:54:13
Score: 3
Natty:
Report link

@Retryable works only when exception is thrown.

private int count=1;
@Override
@Retryable
public int retry() throws Exception {
    if (count <= 2) {
        log.info("retry {} ", count++);
        throw new MySessionExpiredException();
    }
    return count;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Retryable
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Rajendra Prasad