日期:2014-05-20  浏览次数:20696 次

春节快乐!关于jdk5.0的Type safety: The cast from Object to HashMap<String,Object> is actually
代码   return   (HashMap <String,   Object> )   reqMap.get( "User_Code ");

出现   Type   safety:   The   cast   from   Object   to   HashMap <String,Object>   is   actually   checking   against   the   erased   type   HashMap

reqMap也是HashMap <String,   Object> 类型,
怎么去除警告?

------解决方案--------------------
((HashMap <String, Object> ) reqMap).get( "User_Code ");
注意优先级别