GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

io.mcarle.sciurus.retry.RetryAspectHandler   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 13
ccs 8
cts 8
cp 1
rs 10
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A executeAndRetry(ProceedingJoinPoint,Retry) 0 11 4
1
package io.mcarle.sciurus.retry;
2
3
import io.mcarle.sciurus.annotation.Retry;
4
import org.aspectj.lang.ProceedingJoinPoint;
5
6 1
class RetryAspectHandler {
7
8
    static Object executeAndRetry(ProceedingJoinPoint joinPoint, Retry retry) throws Throwable {
9 1
        int retryCount = 0;
10 1
        while (true) {
11
            try {
12 1
                return joinPoint.proceed(); // when no exception, return result
13 1
            } catch (Throwable t) {
14 1
                if (retryCount >= retry.times()) {
15
                    // when not succeeded after specified retry amount, throw last exception
16 1
                    throw t;
17
                }
18 1
                retryCount++;
19
            }
20
        }
21
    }
22
}
23