如何消除 通过使用 @SuppressWarnings("unchecked") 建议使用方式 范围尽可能小(变量/函数/类) 应该禁止在类上标注 每当使用@SuppressWarnings("unchecked") 需要添加注释说明为什么是安全的。