Bug 536754 - Provide better feedback for incorrect Java version
Summary: Provide better feedback for incorrect Java version
Status: RESOLVED FIXED
Alias: None
Product: Viatra
Classification: Modeling
Component: Query (show other bugs)
Version: 2.0.0   Edit
Hardware: Macintosh Mac OS X
: P3 normal
Target Milestone: 2.0.1   Edit
Assignee: Zoltan Ujhelyi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-06 07:41 EDT by Zoltan Ujhelyi CLA
Modified: 2018-07-12 11:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Ujhelyi CLA 2018-07-06 07:41:44 EDT
We have received reports that having Java 7 as a requirement for the project results in confusing error messages in the generated code, like `Type mismatch: cannot convert from Set<Object> to Collection<P.Match>` in the following place

>    public Collection<P.Match> getAllMatches(final Type pT, final Type pRef) {
>      return rawStreamAllMatches(new Object[]{pT, pRef}).collect(Collectors.toSet());
>    }

We should provide some better feedback and possibly update the migrator to ensure the Java 8 dependency as well.
Comment 1 Eclipse Genie CLA 2018-07-06 09:49:48 EDT
New Gerrit change created: https://git.eclipse.org/r/125705
Comment 3 Eclipse Genie CLA 2018-07-11 15:55:10 EDT
New Gerrit change created: https://git.eclipse.org/r/125944
Comment 4 Zoltan Ujhelyi CLA 2018-07-12 04:04:31 EDT
Classpath validator was enhanced to check for Java 8 by looking at the availability of the Stream class, and throws an error if it is missing, preventing the build of Java classes and thus the misleading Java compile errors in this case.

Fix is merged to master and backported to 2.0-maintenance.