Skip to content

Commit f8abec7

Browse files
author
Artem Eroshenko
authored
remove aspect warnings (via allure-framework#92)
1 parent ce403e6 commit f8abec7

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

allure-java-migration/src/main/java/io/qameta/allure/aspects/Allure1TestCaseAspects.java

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import org.aspectj.lang.JoinPoint;
66
import org.aspectj.lang.annotation.Aspect;
77
import org.aspectj.lang.annotation.Before;
8-
import org.aspectj.lang.annotation.Pointcut;
98
import org.aspectj.lang.reflect.MethodSignature;
109

1110
import java.util.Objects;
@@ -18,36 +17,12 @@ public class Allure1TestCaseAspects {
1817

1918
private static AllureLifecycle lifecycle;
2019

21-
/**
22-
* Pointcut for things annotated with {@link org.junit.Test}.
23-
*/
24-
@Pointcut("@annotation(org.junit.Test)")
25-
public void withJunitAnnotation() {
26-
//pointcut body, should be empty
27-
}
28-
29-
/**
30-
* Pointcut for things annotated with {@link org.testng.annotations.Test}.
31-
*/
32-
@Pointcut("@annotation(org.testng.annotations.Test)")
33-
public void withTestNgAnnotation() {
34-
//pointcut body, should be empty
35-
}
36-
37-
/**
38-
* Pointcut for any methods.
39-
*/
40-
@Pointcut("execution(* *(..))")
41-
public void anyMethod() {
42-
//pointcut body, should be empty
43-
}
44-
45-
@Before("anyMethod() && withJunitAnnotation()")
20+
@Before("execution(@org.junit.Test * *.*(..))")
4621
public void junitTestStart(final JoinPoint joinPoint) {
4722
updateTestCase(joinPoint);
4823
}
4924

50-
@Before("anyMethod() && withTestNgAnnotation()")
25+
@Before("execution(@org.testng.annotations.Test * *.*(..))")
5126
public void testNgTestStart(final JoinPoint joinPoint) {
5227
updateTestCase(joinPoint);
5328
}

allure-java-migration/src/main/resources/META-INF/aop-ajc.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
<aspect name="io.qameta.allure.aspects.Allure1StepsAspects"/>
55
<aspect name="io.qameta.allure.aspects.Allure1AttachAspects"/>
66
</aspects>
7+
<weaver options="-warn:none -Xlint:ignore"/>
78
</aspectj>

0 commit comments

Comments
 (0)