Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Simple compilation fails in Eclipse Oxygen.3a( )
Simple compilation fails in Eclipse Oxygen.3a [message #1786959] Wed, 16 May 2018 12:14 Go to next message
Decebal Suiu is currently offline Decebal SuiuFriend
Messages: 3
Registered: May 2018
Junior Member
Hi,

I wish to migrate a Java application (Java 8) from Eclipse 4.4 to Eclipse 4.7 but I encounter a strange problem. I present you below, my use scenario:
Using Eclipse UI (rught clikc -> New -> Class), I create a new class (DevWebMetadata2) that extends an existed class (DevWebMetadataAdapter). After this, I use the Eclipse UI (right click -> Source -> Override methods...) to override only one method.
So, I didn't touch the class generated/created by Eclipse but I obtain a compilation error for the new created class.

import java.util.List;

public class DevWebMetadata2 extends DevWebMetadataAdapter
{

	@Override
	public List<Class<? extends IIdentifiable>> getMetaDataIdWeb()
	{
		// TODO Auto-generated method stub
		return super.getMetaDataIdWeb();
	}

}


The error messages is
Type mismatch: cannot convert from List<Class<? extends IIdentifiable>> to List<Class<? extends IIdentifiable>>


Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200
org.eclipse.jdt.core version: 3.13.102.v20180330-0919

Is it a bug in compiler?
If you need more information, please ask.

[Updated on: Thu, 17 May 2018 06:34]

Report message to a moderator

Re: Simple compilation failes in Eclipse Oxygen [message #1786979 is a reply to message #1786959] Wed, 16 May 2018 18:39 Go to previous messageGo to next message
Till Brychcy is currently offline Till BrychcyFriend
Messages: 1
Registered: May 2016
Junior Member
If IIdentifiable is a raw type, then this is https://bugs.eclipse.org/bugs/show_bug.cgi?id=532137
This is fixed in 4.8M7 (download SDK now from http://download.eclipse.org/eclipse/downloads/ or other packages in a few days from https://www.eclipse.org/downloads/index-developer.php)
Re: Simple compilation failes in Eclipse Oxygen [message #1786999 is a reply to message #1786979] Thu, 17 May 2018 06:01 Go to previous messageGo to next message
Decebal Suiu is currently offline Decebal SuiuFriend
Messages: 3
Registered: May 2018
Junior Member
IIdentifiable looks like

public interface IIdentifiable<T extends IIdentifiable<T>> 
{

    Id<T> getId();
    // other methods

}
Re: Simple compilation failes in Eclipse Oxygen [message #1787032 is a reply to message #1786979] Thu, 17 May 2018 12:58 Go to previous message
Decebal Suiu is currently offline Decebal SuiuFriend
Messages: 3
Registered: May 2018
Junior Member
Thanks!

I can confirm that on Eclipse SDK 4.8M7 (Version: Photon (4.8), Build id: I20180509-2000) everything works OK.
So, it's very possible to be Bug 532137 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=532137).
Previous Topic:Reading value programmertically from IJavaVariable instance
Next Topic:Compilation problem with exceptions
Goto Forum:
  


Current Time: Sun Sep 23 07:14:48 GMT 2018

Powered by FUDForum. Page generated in 0.01918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top