In Eclipse I m getting the following warning while I tried to use generics.
"Type safety: The cast from Object to Collection<String> is actually checking against the erased type Collection"
My code goes like...
Collection rules = null;
rules = (Collection<String>) JmxServiceAgent.invoke(InfoVO);
Where "JmxServiceAgent.invoke(mBeanInfoVO)" will return an object and my expectation is of type Collection<String>
Please letme know watz wrong with the code?
"Type safety: The cast from Object to Collection<String> is actually checking against the erased type Collection"
My code goes like...
Collection rules = null;
rules = (Collection<String>) JmxServiceAgent.invoke(InfoVO);
Where "JmxServiceAgent.invoke(mBeanInfoVO)" will return an object and my expectation is of type Collection<String>
Please letme know watz wrong with the code?