Thanks for the direction. I think my snippet was not clear enough, as the process(), doClass1(), doClass2() are methods of a handler class.
I simply replaced the casting of Class1 & Class2 to Object and everything worked fine, my method doClassX() now looks like this.
doClassX()
{
..
Object obj = wigit.get();
process(obj);
..
}
Regards,
Bluespud.
|