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 22
33public 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
You can’t perform that action at this time.
0 commit comments