mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Merge pull request #6672 from Marcono1234/marcono1234/functional-interfaces-test
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