Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eclipse compilation (backport of #66047) #66052

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Dec 8, 2020

Looks like we've hit another "funny" eclipse compiler error. I filed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=569557 , but short version
is that the following code compiles with javac and not eclipse:

package test;

import java.util.function.Supplier;

public class Test {
	private final Object o = new Object();

	private class Inner {
		public Inner() {
			this(() -> o);
		}

		private Inner(Supplier<Object> o) {}
	}
}

Specifically the outer class's o can't be refered to in the lambda.
This stops us from doing that in ML so eclipse can be happy again.

Looks like we've hit another "funny" eclipse compiler error. I filed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=569557 , but short version
is that the following code compiles with javac and not eclipse:
```
package test;

import java.util.function.Supplier;

public class Test {
	private final Object o = new Object();

	private class Inner {
		public Inner() {
			this(() -> o);
		}

		private Inner(Supplier<Object> o) {}
	}
}
```

Specifically the outer class's `o` can't be refered to in the lambda.
This stops us from doing that in ML so eclipse can be happy again.
@nik9000 nik9000 merged commit 69198ec into elastic:7.x Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant