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.

lockAnnotated(Lock)   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 2
ccs 0
cts 0
cp 0
crap 2
rs 10
1 1
package io.mcarle.sciurus.lock;
2
3
import io.mcarle.sciurus.annotation.Lock;
4
import org.aspectj.lang.ProceedingJoinPoint;
5
import org.aspectj.lang.annotation.Around;
6
import org.aspectj.lang.annotation.Aspect;
7
import org.aspectj.lang.annotation.Pointcut;
8
9
@Aspect
10 1
public class LockAspect {
11
12
    /**
13
     * Matches any execution of any method
14
     */
15
    @Pointcut("execution(* *(..))")
16
    void anyMethod() {
17
    }
18
19
    /**
20
     * Matches any method, which is annotated with {@link Lock}
21
     */
22
    @Pointcut("@annotation(lock)")
23
    void lockAnnotated(Lock lock) {
24
    }
25
26
    @Around(value = "anyMethod() && lockAnnotated(lock)", argNames = "joinPoint,lock")
27
    public Object executionOfAnyMethodAnnotatedWithLock(
28
            ProceedingJoinPoint joinPoint,
29
            Lock lock
30
    ) throws Throwable {
31 1
        return LockAspectHandler.checkLockAndExecute(joinPoint, lock);
32
    }
33
}
34