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.

executeAndRetry(ProceedingJoinPoint,Retry)   A
last analyzed

Complexity

Conditions 4

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 4
eloc 9
c 1
b 0
f 0
dl 0
loc 11
ccs 7
cts 7
cp 1
crap 4
rs 9.95
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