mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Java: Extend functional interfaces test
This commit is contained in:
@@ -21,9 +21,19 @@ public class Test {
|
||||
interface FunctionalWithObjectMethods {
|
||||
int f();
|
||||
|
||||
String toString();
|
||||
|
||||
// Not actually abstract; implementation comes from Object
|
||||
boolean equals(Object obj);
|
||||
int hashCode();
|
||||
String toString();
|
||||
}
|
||||
|
||||
interface NotFunctionalWithObjectMethods {
|
||||
int f();
|
||||
|
||||
// Increases their visibility from `protected` to `public`; this requires subclasses to implement them
|
||||
// See also JLS section "Functional Interfaces" which explicitly covers this
|
||||
Object clone();
|
||||
void finalize();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user