[Java8] Wrong compilation error reported? [message #1748497] |
Wed, 23 November 2016 15:56 |
|
Hello,
I have a compilation error in the workspace but when compiling using Maven, everything seems fine.
Here is the error reported:
The type of resolve(Set<Bean<? extends Object>>) from the type BeanManager is Bean<? extends Object>, this is incompatible with the descriptor's return type: Bean<Object>
The related code is:
return Optional.of(manager.getBeans(name))
.map(manager::resolve)
.map(bean -> getReference(manager, type, bean));
that can be found on github here: https://github.com/apache/camel/blob/master/components/camel-cdi/src/main/java/org/apache/camel/cdi/BeanManagerHelper.java#L42
I'm using Eclipse Oxygen M3
Version: Oxygen Release Milestone 3 (4.7.0 M3)
Build id: 20161103-0824
Am I right to think that it is a bug in Eclipse?
Regards,
Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
|
|
|
|
Re: [Java8] Wrong compilation error reported? [message #1748507 is a reply to message #1748506] |
Wed, 23 November 2016 17:35 |
|
Hi Stephan,
thanks for the suggestion.
Do you mean that potentially the Java 8 compiler was able to compile this code but that Java 9 might not because some fix were done? Seems weird.
I didn't use javac directly since my student years. There are quite a lot of dependency for which I don't know how to determine them and let javac be aware of.
I tried to use Java 9 with maven directly but it fails with "Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher"
I tried to use Java 9 compilation compliance level in Eclipse preference on the project but there is still the same error.
Regards,
Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
|
|
|
Powered by
FUDForum. Page generated in 0.03599 seconds