File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
java/ql/test/query-tests/EmptyMethod Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
- | Test.java:13 :15:13 :16 | f2 | This empty method should be completed. |
2
- | Test.java:35 :18:35 :23 | method | This empty method should be completed. |
1
+ | Test.java:16 :15:16 :16 | f2 | This empty method should be completed. |
2
+ | Test.java:43 :18:43 :23 | method | This empty method should be completed. |
Original file line number Diff line number Diff line change 2
2
3
3
public class Test {
4
4
5
+ // COMPLIANT
5
6
public void f () {
6
7
int i = 0 ;
7
8
}
8
9
10
+ // COMPLIANT
9
11
public void f1 () {
10
12
// intentionally empty
11
13
}
12
14
15
+ // NON_COMPLIANT
13
16
public void f2 () { } // $ Alert
14
17
18
+ // COMPLIANT - exception
15
19
@ Pointcut ()
16
20
public void f4 () {
17
21
}
18
22
19
23
public abstract class TestInner {
20
24
21
- public abstract void f ();
25
+ public abstract void f (); // COMPLIANT - intentionally empty
26
+
22
27
}
23
28
24
29
public class Derived extends TestInner {
25
30
31
+ // COMPLIANT: with annotation
26
32
@ Override
27
33
public void f () {
28
34
}
29
35
36
+ // COMPLIANT: native
30
37
public native int nativeMethod ();
31
38
}
32
39
33
40
public interface TestInterface {
34
41
42
+ // NON_COMPLIANT
35
43
default void method () { } // $ Alert
36
44
}
37
45
You can’t perform that action at this time.
0 commit comments