I tried doing this and it works....but I cannot Iterate over the Set so its useless to me
Set<ClassA> foo;
Set<? extends ClassA> = Set<ClassA>;
Type mismatch: cannot convert from element type capture#3-of ? extends ClassA to ClassB
how can I accomplish this if possible?? im tryign to migrate an app from java 1.4 to java6 and this is road blocking me.
(It's good to follow up with the solution so that other readers, or people that land here via search result, know what the issue was.)
Raymond Holguin
Ranch Hand
Joined: Aug 11, 2009
Posts: 47
posted
0
yes your correct, my apologies.
Turns out
Set<ClassA> foo;
Set<ClassB> = foo;
was never the situation...foo actually was Set<ClassB> the whole time.
Set<ClassB> foo;
Set<ClassB> = foo;
which is valid of course!!
I realized this after digging through the hibernate mapping for file this class. The reason why i got so confused in the place was because In the actual code ClassA and ClassB have the same name but different package locations AND you have 2 classes w/ the same name where one extend off the other LOL...thus i got confused which was which.