Type mismatch error only under Eclipse 3.1.1 using jdk1.5.0_05 [message #599593] |
Sat, 19 November 2005 21:52 |
|
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-)
|
|
|
Powered by
FUDForum. Page generated in 0.03066 seconds