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.lock.LockAspect   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 23
ccs 2
cts 2
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A lockAnnotated(Lock) 0 2 1
A executionOfAnyMethodAnnotatedWithLock(ProceedingJoinPoint,Lock) 0 6 1
A anyMethod() 0 2 1
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