mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Migrate Java code to separate QL repo.
This commit is contained in:
35
java/ql/test/query-tests/MissingOverrideAnnotation/Test.java
Normal file
35
java/ql/test/query-tests/MissingOverrideAnnotation/Test.java
Normal file
@@ -0,0 +1,35 @@
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
class Super {
|
||||
int m() {
|
||||
return 23;
|
||||
}
|
||||
|
||||
private void n() {}
|
||||
|
||||
public String f() {
|
||||
return "Hello";
|
||||
}
|
||||
}
|
||||
|
||||
public class Test extends Super {
|
||||
// NOT OK
|
||||
int m() {
|
||||
return 42;
|
||||
}
|
||||
|
||||
// OK
|
||||
public void n() {}
|
||||
|
||||
// OK
|
||||
@Override
|
||||
public String f() {
|
||||
return "world";
|
||||
}
|
||||
|
||||
public void test() {
|
||||
// OK
|
||||
Arrays.asList(1,2).stream().map(x -> x+1).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user