Morning I pushed the plugins upto 1.8 across both core and cda from github
I get the following error for one of the files - but only in maven not in eclipse compile
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.22.0:compile (default-compile) on project org.openhealthtools.mdht.emf.runtime: Compilation failure: Compilation failure: [ERROR] /Users/seanmuir/git/mdht/mdht/core/plugins/org.openhealthtools.mdht.emf.runtime/src/org/openhealthtools/mdht/emf/runtime/util/Initializer.java:[435] [ERROR] init(object, getRegistry(object).getInitializers(object.eClass())); [ERROR] ^^^^ [ERROR] The method init(EObject, Iterable<? extends I>) in the type Initializer.Util is not applicable for the arguments (T, Iterable<capture#62-of ? extends Initializer<? super EObject>>) [ERROR] 1 problem (1 error) [ERROR] -> [Help 1] [
org.openhealthtools.mdht.emf.runtime.util.Initializer.Util.init(T) Line 435
original
public static <T extends EObject> T init(T object) { init(object, getRegistry(object).getInitializers(object.eClass())); return object; }
this will compile with 1.8 @SuppressWarnings({ "unchecked", "rawtypes" }) public static <T extends EObject> T init(T object) { init((EObject) object, (Iterable) getRegistry(object).getInitializers(object.eClass())); return object; }
I can only assume that 1.8 treats generics slightly differently and we need to set some compiler setting for java 1.8
everything compiles fine with 1.7
i would rather not have to add the casts
anbody have any clues
thanks
Sean
|