The next code
public class FilterState<T>{
Map<String, Object> getProperties(){return null;} // null for shorteness
}
....
public test(FilterState filterState){
Map<String, Object> map = filterState.getProperties();
}
produces warning
Unchecked assignment: 'java.util.Map' to 'java.util.Map<java.lang.String, java.lang.Object>
However if I replace procedure definition with
public <T> test(IFilterState<T> filterState)
warning disappears. I have no clue what class generic has to do with map assignment. Quick search through generic documentation didn't help. Any idea where to look, anyone? :)