解决办法:Type safety: The expression of type List needs unchecked conversion to conform

简介: 解决办法:Type safety: The expression of type List needs unchecked conversion to conform

对于警告,吾必去之。遇到下面的警告,怎么办?


Type safety: The expression of type List needs unchecked conversion to conform


对于List,Hashtable等都有这样的警告。


  • 解决办法一,造型。

 List<?> temp =


  • 解决办法二,禁止检查,

 @SuppressWarnings("unchecked")


目录
相关文章
|
4月前
|
CDN
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
42 0
|
7月前
|
JavaScript 程序员 Swift
The compiler is unable to type-check this expression in reasonable time; try breaking up the express
The compiler is unable to type-check this expression in reasonable time; try breaking up the express
78 0
|
JSON 数据格式
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
解决办法:Type safety: The expression of type List needs unchecked conversion to conform
336 0
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
472 0
TypeError: unsupported operand type(s) for -=: &#39;Retry&#39; and &#39;int&#39;
TypeError: unsupported operand type(s) for -=: &#39;Retry&#39; and &#39;int&#39;
248 0
成功解决TypeError: unsupported operand type(s) for +: 'dict_items' and 'list'
成功解决TypeError: unsupported operand type(s) for +: 'dict_items' and 'list'