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 #66047

Merged
merged 1 commit into from
Dec 8, 2020
Merged

Fix eclipse compilation #66047

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.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

Copy link
Member

@cbuescher cbuescher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just chiming in that this resolved the issue in Eclipse for me. I don't know if there is other options on the code side I'll leave that decision open.

@nik9000 nik9000 merged commit 01460fa into elastic:master Dec 8, 2020
@nik9000
Copy link
Member Author

nik9000 commented Dec 8, 2020

Thanks for reviews folks!

nik9000 added a commit to nik9000/elasticsearch that referenced this pull request 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.
nik9000 added a commit that referenced this pull request 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.
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.

5 participants