Bug 468455 - [Tests] Migrate org.eclipse.e4.core.tests to Java 8 to simplify tests
Summary: [Tests] Migrate org.eclipse.e4.core.tests to Java 8 to simplify tests
Status: CLOSED DUPLICATE of bug 474642
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 4.6 M2   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2015-05-27 06:13 EDT by Lars Vogel CLA
Modified: 2015-08-12 12:41 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2015-05-27 06:13:14 EDT
Migrating to Java 8 allows us to improve the readability of our tests, e.g., instead of:

context.set("bar", new IContextFunction() {
			@Override
			public Object compute(IEclipseContext context, String contextKey) {
				return "baz1";
			}
		});

We can write

context.set("bar", (IContextFunction) (context1, contextKey) -> "baz1");
Comment 1 Eclipse Genie CLA 2015-05-28 10:55:43 EDT
New Gerrit change created: https://git.eclipse.org/r/48876
Comment 2 Lars Vogel CLA 2015-05-28 11:05:03 EDT
(In reply to Eclipse Genie from comment #1)
> New Gerrit change created: https://git.eclipse.org/r/48876

David, this fails on our Gerrit build validation with the following error message:

Resolution errors:
   Bundle org.eclipse.e4.core.tests - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.8

Any idea why this fails?
Comment 3 David Williams CLA 2015-05-28 11:10:25 EDT
(In reply to Lars Vogel from comment #2)
> (In reply to Eclipse Genie from comment #1)
> > New Gerrit change created: https://git.eclipse.org/r/48876
> 
> David, this fails on our Gerrit build validation with the following error
> message:
> 
> Resolution errors:
>    Bundle org.eclipse.e4.core.tests - Missing Constraint:
> Bundle-RequiredExecutionEnvironment: JavaSE-1.8
> 
> Any idea why this fails?

Off hand I suspect you are using Java 7 to build/and run the tests?
Comment 4 Lars Vogel CLA 2015-06-01 13:11:18 EDT
(In reply to David Williams from comment #3)
> Off hand I suspect you are using Java 7 to build/and run the tests?

Thanks, the job was configured to use Java 7. I changed that, but it is still failing.

Mikael, can you help with this issue? https://hudson.eclipse.org/platform/job/eclipse.platform.runtime-Gerrit/80/console reports the following resolution errors:
   Bundle org.eclipse.e4.core.tests - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Comment 5 Lars Vogel CLA 2015-06-01 13:18:07 EDT
Found the error.

build.properties specifies jre.compilation.profile = JavaSE-1.7

Is this actually still required to configure? AFAIK the BREE is taking if this setting is not present. https://wiki.eclipse.org/Tycho/Execution_Environments
Comment 6 Lars Vogel CLA 2015-08-12 12:41:08 EDT

*** This bug has been marked as a duplicate of bug 474642 ***