Type safety: The expression of type List needs unchecked conversion to conform to List<TagFormal>
报这个错,如果代码没错只需要加
@SuppressWarnings("unchecked")
就行了
解释一:
屏蔽某些编译时的警告信息
在强制类型转换的时候编译器会给出警告
加上
程序代码
@SuppressWarnings("unchecked")
安全警告,可以用它来消除
Type safety: The expression of type List needs unchecked conversion to conform to List<TagFormal>相关推荐
- Type safety: The expression of type List needs unchecked conversion to conform to ListXXX解决办法
上图是一个dom4j经典读取操作,但获取节点元素时会提醒你类型安全问题,因为返回的List是未知的,你用已知的List去接收,难免会发生意外,当然对于我们的理解,返回的当然是这个类型,但对程序是未知的 ...
- Type safety: The method add(Object) belongs to the raw type List. References to generic type List<E>
1 java 报错如下 Type safety: The method add(Object) belongs to the raw type List. References to generic ...
- 编译器报错The type of the expression must be an array type but it resolved to int.
代码编写过程中报错The type of the expression must be an array type but it resolved to int. 说明一个int类型的变量被当作了数组 ...
- C语言编译时产生的警告:initializing ‘char *‘ with an expression of type ‘const char *‘ discards qualifiers
警告的产生: char *my_strstr(const char *str1,const char *str2) {const char *s1 = NULL;const char *s2 = NU ...
- SpringBoot:ERROR: column “***“ is of type numeric but expression is of type character varying
问题 SpringBoot:在postgresql数据库提交数据时,出现ERROR: column "***" is of type numeric but expression ...
- error: invalid initialization of reference of type ‘std::string’ from expression of type ‘const s
error: invalid initialization of reference of type 'std::string&' from expression of type 'const ...
- RuntimeError: Expected object of device type cuda but got device type cpu for argument pytorch数据位置
RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'target' i ...
- Pytorch 类型错误:Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor.
Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor Pytorcht调试过程中,将数据传入模 ...
- SAP WM Movement Type 里的‘Ref.Stor.Type Search’字段用法初探
SAP WM Movement Type 里的'Ref.Stor.Type Search'字段用法初探 笔者在目前的项目里负责MM以及WM两个模块的实施.根据客户仓库存储区域的现状,我在WM层面的st ...
最新文章
- 深度卷积生成对抗网络
- 如何用Python实现超级玛丽的人物行走和碰撞检测?
- FreeRTOS学习笔记4-FreeRTOS配置管理
- google Guava包的ListenableFuture解析
- Fabio技术手册(2):部署
- StrategyPattern--策略模式java实现
- 25行代码AC_ 2017年C/C++ A组第四题 方格分割(dfs剪痕+解题报告)
- python状态码409_HTTP状态码
- Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 10.x
- selenium学习过程中遇到的问题
- Android报错之You need to use a Theme.AppCompat theme (or descendant) with this activity.
- 【笔记】菜鸟教程-JavaScript
- Android逆向之旅---Android手机端破解神器MT的内购VIP功能破解教程
- 不谋一时不足以谋一域_不谋万世者不足谋一时,不谋全局者不足谋一域是什么意思...
- java海贼王秘宝传说下载_我的世界1.7.10海贼王整合包
- Android JNI开发三: SO库的使用
- opencv matlab配置,MATLAB配置mexopencv
- HTMLCSS基础篇之十一:字体与颜色样式
- 数学学习笔记(二)柯西-黎曼方程理解
- 【计算机视觉40例】案例40:识别性别与年龄