Skip to content

Commit d4955a0

Browse files
committed
Fix failing test and add new test case
1 parent 9662b47 commit d4955a0

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import org.aspectj.lang.annotation.Pointcut;
2+
3+
public class Class1 {
4+
5+
// COMPLIANT
6+
public void f() {
7+
int i = 0;
8+
}
9+
10+
// COMPLIANT
11+
public void f1() {
12+
// intentionally empty
13+
}
14+
15+
// NON_COMPLIANT
16+
public void f2() { } // $ Alert
17+
18+
// COMPLIANT - exception
19+
@Pointcut()
20+
public void f4() {
21+
}
22+
23+
public abstract class TestInner {
24+
25+
public abstract void f(); // COMPLIANT - intentionally empty
26+
27+
}
28+
29+
public class Derived extends TestInner {
30+
31+
// COMPLIANT: with annotation
32+
@Override
33+
public void f() {
34+
}
35+
36+
// COMPLIANT: native
37+
public native int nativeMethod();
38+
}
39+
40+
public interface TestInterface {
41+
42+
// NON_COMPLIANT
43+
default void method() { } // $ Alert
44+
}
45+
46+
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
| Test.java:16:15:16:16 | f2 | Empty method found. |
1+
#select
2+
| Class1.java:16:15:16:16 | f2 | Empty method found. |
3+
| Class1.java:43:18:43:23 | method | Empty method found. |
24
| Test.java:43:18:43:23 | method | Empty method found. |
5+
testFailures
6+
| Test.java:16:24:16:33 | // $ Alert | Missing result: Alert |

0 commit comments

Comments
 (0)