mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 22:45:04 +00:00
remove unnecessary semicolon and return
This commit is contained in:
parent
0bfb166eeb
commit
ab457be9d8
@ -112,13 +112,13 @@ public class FunctionRefTests extends ScriptTestCase {
|
|||||||
public void testOwnStaticMethodReference() {
|
public void testOwnStaticMethodReference() {
|
||||||
//System.out.println(Debugger.toString("int mycompare(int i, int j) { return j - i; } " +
|
//System.out.println(Debugger.toString("int mycompare(int i, int j) { return j - i; } " +
|
||||||
// "List l = new ArrayList(); l.add(2); l.add(1); l.sort(this::mycompare); return l.get(0);"));
|
// "List l = new ArrayList(); l.add(2); l.add(1); l.sort(this::mycompare); return l.get(0);"));
|
||||||
assertEquals(2, exec("int mycompare(int i, int j) { return j - i; } " +
|
assertEquals(2, exec("int mycompare(int i, int j) { j - i } " +
|
||||||
"List l = new ArrayList(); l.add(2); l.add(1); l.sort(this::mycompare); return l.get(0);"));
|
"List l = new ArrayList(); l.add(2); l.add(1); l.sort(this::mycompare); return l.get(0);"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AwaitsFix(bugUrl = "working on it")
|
@AwaitsFix(bugUrl = "working on it")
|
||||||
public void testOwnStaticMethodReferenceDef() {
|
public void testOwnStaticMethodReferenceDef() {
|
||||||
assertEquals(2, exec("int mycompare(int i, int j) { return j - i; } " +
|
assertEquals(2, exec("int mycompare(int i, int j) { j - i } " +
|
||||||
"def l = new ArrayList(); l.add(2); l.add(1); l.sort(this::mycompare); return l.get(0);"));
|
"def l = new ArrayList(); l.add(2); l.add(1); l.sort(this::mycompare); return l.get(0);"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user