I'm having hard time googling this. I found a lot of articles but I can't still solve my problem.
Here is my code:
List<MyMainClass> mySource = (List<MyMainClass>) session.getAttribute("myAttribute");
the session.getAttribute("myAttribute") may return List<MyObject1> or List<MyObject2>. Both MyObject1 and MyObject2 are subclasses of MyMainClass Now I have 2 functions. The first one accepts List<MyObject1> and the other one accepts List<MyObject2>. Now Im getting error in eclipse
The method myMethod1(List<MyObject1>) in the type MyAction is not applicable for the arguments (List<MyMainClass>)
myMethod1is defined, and how you are invoking it? It seemsmyMethod1needs aMyObject1list, but you are passing it aMyMainClasslist, which will not be accepted.