How could i fix this warning?
Type safety: Unchecked cast from
ListtoList<ArrayObject>
List<List<ArrayObject>> detailList = search.getDetails(
(List<ArrayObject>) ((DefaultListBackedValueList) request.getAttribute(LIST)).getList());
How could i fix this warning?
Type safety: Unchecked cast from
ListtoList<ArrayObject>
List<List<ArrayObject>> detailList = search.getDetails(
(List<ArrayObject>) ((DefaultListBackedValueList) request.getAttribute(LIST)).getList());
Since getAttribute() is not parameterized method and returns Object there is no way to fix the warning. You have to suppress it.
When I have to suppress warning I typically try to decrease the scope of suppression. In your case you can suppress warning on current statement or create special method that returns List<ICTWeb> and suppress warning there. You can also write a short comment that describes why do you suppress warning.
BTW I have no idea why are you using double casting (List<ArrayObject>) ((DefaultListBackedValueList). I believe it is no necessary.