Unchecked assignment: 'io.protostuff.Schema' to 'io.protostuff.Schema<T>' less... (Ctrl+F1)
Signals places where an unchecked warning is issued by the compiler, for example:
void f(HashMap map) {
map.put("key", "value");
}
Hint: Pass -Xlint:unchecked to javac to get more details.
在Idea上码代码的时候发现了一个警告, 点开一看有点好奇, 百度一下:
解决方案:
在方法上加
@SuppressWarnings("unchecked")
不过感觉有点鸡肋, 掩耳盗铃.
博客讲述在Idea上编码时遇到编译器发出的Unchecked警告,如将'io.protostuff.Schema'赋值给'io.protostuff.Schema<T>',还给出示例代码。同时提到解决方案是在方法上加注解,但认为此方法有点鸡肋。
2219

被折叠的 条评论
为什么被折叠?



