ClassCastException
。
示例:
List items = Arrays.asList("string", "string");
List<Integer> numbers = Collections.unmodifiableList(items); // 未检查的赋值
该快速修复会尝试泛化该包含文件,此举可能会揭示编辑器中以及编译期间以前仅在运行时出现的问题:
List<String> items = Arrays.asList("string", "string");
List<Integer> numbers = Collections.unmodifiableList(items); // 不兼容的类型