Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Type mismatch error only under Eclipse 3.1.1 using jdk1.5.0_05
Type mismatch error only under Eclipse 3.1.1 using jdk1.5.0_05 [message #69927] Sat, 19 November 2005 21:52 Go to next message
Eclipse UserFriend
Originally posted by: weconsul.ptd.net

Hello all,

I submitted this question to eclipse.newcomer but no answer. I figured I
would send to eclipse.platform, eclipse.tools.jdt and eclipse.technology

My environment is Win XP SP 2, Eclipse 3.1.1, jre\jdk1.5.0_05

Problem - I am not having any compiler errors when I compile this java
package outside of Eclipse under Dos cmd prompt. Also, I am not having
any errors If I port this java package into Netbeans 5.0 Beta.

Under Eclipse I am getting a compiler error..

'Type mismatch: cannot convert from HashMap<K,V> to
HashMap<Contributer,ArrayList<Role>>'

Would someone know why I am having this problem only in Eclipse... It
has to be something simple like a setting not set correctly for this
project.



In the constructor, for the class with this error, the HashMap is
defined as..

private HashMap<Contributer,ArrayList<Role>> contributers;


The method that receives the error, is defined as..

public void load() {
contributers=FileUtils.deserialize("contributers",contributers.getClass());
}


FileUtils.deserialize is defined as..

public static <T extends Serializable> T deserialize(String
fname,Class<? extends T> c)
{
FileInputStream in=null;
T obj=null;

try {
in=new FileInputStream(fname);
} catch(FileNotFoundException e) {}

obj=IOUtils.deserialize(in,c);
try {
in.close();
} catch(IOException e) {}
return obj;
}

--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
____________________________________________________________ ______________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Re: Type mismatch error only under Eclipse 3.1.1 using jdk1.5.0_05 [message #69948 is a reply to message #69927] Sun, 20 November 2005 05:16 Go to previous message
Eclipse UserFriend
Originally posted by: olivier_thomann.NOca.ibm.comSPAM

IchBin a écrit :
> Under Eclipse I am getting a compiler error..
>
> 'Type mismatch: cannot convert from HashMap<K,V> to
> HashMap<Contributer,ArrayList<Role>>'
>
> Would someone know why I am having this problem only in Eclipse... It
> has to be something simple like a setting not set correctly for this
> project.
Enter a bug report against JDT/Core with steps to reproduce and we will
investigate.
--
Olivier
Re: Type mismatch error only under Eclipse 3.1.1 using jdk1.5.0_05 [message #599608 is a reply to message #69927] Sun, 20 November 2005 05:16 Go to previous message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
IchBin a écrit :
> Under Eclipse I am getting a compiler error..
>
> 'Type mismatch: cannot convert from HashMap<K,V> to
> HashMap<Contributer,ArrayList<Role>>'
>
> Would someone know why I am having this problem only in Eclipse... It
> has to be something simple like a setting not set correctly for this
> project.
Enter a bug report against JDT/Core with steps to reproduce and we will
investigate.
--
Olivier
Previous Topic:Type mismatch error only under Eclipse 3.1.1 using jdk1.5.0_05
Next Topic:Process Framework (EPF) "Beacon" Project
Goto Forum:
  


Current Time: Fri Dec 06 17:20:28 GMT 2024

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

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

Back to the top