Community
Participate
Working Groups
WTP 3.8.0- builds just failed with the following error. Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.21.0:compile (default-compile) on project org.eclipse.jst.common.ui: Compilation failure: Compilation failure: [ERROR] /jobs/genie.webtools/WTP-R3_8_Integration/workspace/webtools.common/plugins/org.eclipse.jst.common.ui/src/org/eclipse/jst/common/ui/internal/assembly/wizard/AddManifestEntryTaskWizard.java:[230] [ERROR] public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ERROR] The method inputChanged(Viewer, Object, Object) of type AddManifestEntryTaskWizard.ShowPossibleManifestEntryContentProvider must override a superclass method This is a blocker for M6 candidate. Please take a look at it asap. thanks
So our plugin does not use Java 8 to compile. ArrayContentProvider.inputChanged() was removed because it's interface, IContentProvider, now has: default public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} The default keyword on an interface is new to Java 8, and does not seem to work with the @Override on our method.
This is confusing- the docs state that when default is used in an interface, @Override is not needed to override... which is just the opposite of why @Override was put there in the first place. So it is either: 1) Get Platform UI to make a compatible change to ArrayContentProvider or 2) Remove the now "extraneous" @Override in our code (which means that our source has to change to still compile with the "compatible" change in ArrayContentProvider
Looks like you are violating the API here. ArrayContentProvider says: @noextend This class is not intended to be subclassed by clients.
(In reply to Dani Megert from comment #3) > Looks like you are violating the API here. ArrayContentProvider says: > > @noextend This class is not intended to be subclassed by clients. Dani, Was it marked as such 6 years ago? (That's when our class was created, and it hasn't been touched in over 5 years.) OK, so simply put, that makes it our duty to remove the compile error. I will commit a change to fix it.
@Override has a troubled history, see bug 392931: - In 1.5, @Override was only allowed on methods overriding a superclass method. - In 1.6, @Override was also allowed on methods overriding or implementing an interface method. However, the Javadoc of the @interface Override was not fixed. - In 1.7, they finally fixed the Javadoc as well. This is only a source compatibility problem for 1.5 clients. An alternative to http://git.eclipse.org/c/webtools-common/webtools.common.git/commit/?id=e53db74702dce1a3398d44a73845bd70f1e56139 would have been to keep the @Override, but convert your bundle to 1.6.
I was a bit too quick. This is actually a "bug" in ecj: bug 489940. I put "bug" in quotes because there's no specification for compiling 1.5 source against a 1.8 classpath, so compiler implementors are on their own to find a good solution for such use cases.