Skip to content

Commit 17aa3fc

Browse files
committed
Add compliant/non-compliant comments back to the test file
1 parent dea081b commit 17aa3fc

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
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. |

java/ql/test/query-tests/EmptyMethod/Test.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,44 @@
22

33
public class Test {
44

5+
// COMPLIANT
56
public void f() {
67
int i = 0;
78
}
89

10+
// COMPLIANT
911
public void f1() {
1012
// intentionally empty
1113
}
1214

15+
// NON_COMPLIANT
1316
public void f2() { } // $ Alert
1417

18+
// COMPLIANT - exception
1519
@Pointcut()
1620
public void f4() {
1721
}
1822

1923
public abstract class TestInner {
2024

21-
public abstract void f();
25+
public abstract void f(); // COMPLIANT - intentionally empty
26+
2227
}
2328

2429
public class Derived extends TestInner {
2530

31+
// COMPLIANT: with annotation
2632
@Override
2733
public void f() {
2834
}
2935

36+
// COMPLIANT: native
3037
public native int nativeMethod();
3138
}
3239

3340
public interface TestInterface {
3441

42+
// NON_COMPLIANT
3543
default void method() { } // $ Alert
3644
}
3745

0 commit comments

Comments
 (0)