当前位置:网站首页>A trinomial expression that causes a null pointer
A trinomial expression that causes a null pointer
2022-04-23 04:59:00 【GreatorMan】
Developing user systems , Use... In role types in user permissions get Method in data copy , Keep reporting null pointer :

At the time of testing the data copy , The copy time is consistent and null pointer is reported , Later, according to the analysis and debugging, it is found that roleTypeKey The data is returned in the roleTypeKey It's empty , This is caused by the problem of data packing and unpacking ; enumeration RoleType Type in the Key by int data type , After the program is compiled, it is as follows :
@Transient
private Integer roleTypeKey;
public Interger getRoleTypeKey(){
return getRoleType() != null ? getRoleType().getEnumItem().getItamKey():roleTypeKey.intVal();
}
When roleTypeKey When the data is empty Copy call getRoleTypeKey(); Method is null pointer ;
版权声明
本文为[GreatorMan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220553102266.html
边栏推荐
- 拼了!两所A级大学,六所B级大学,纷纷撤销软件工程硕士点!
- Learning Android from scratch -- Introduction
- MySQL time function query
- Innovation training (IV) preliminary preparation - server
- Machine learning - linear regression
- 深度学习笔记 —— 微调
- 《2021多多阅读报告》发布,95后、00后图书消费潜力攀升
- Innovation training (V) configuration information
- Teach you how to build the ruoyi system by Tencent cloud
- Implementation of switching windows and capturing data in selenium mode
猜你喜欢

Pixel mobile phone brick rescue tutorial

The 8 diagrams let you see the execution sequence of async / await and promise step by step

拼了!两所A级大学,六所B级大学,纷纷撤销软件工程硕士点!

How can continuous integration (CI) / continuous delivery (CD) revolutionize automated testing
![[2021] Spatio-Temporal Graph Contrastive Learning](/img/7d/67a0bfa0adecee24bbe291a25ae906.png)
[2021] Spatio-Temporal Graph Contrastive Learning

Field injection is not recommended using @ Autowired

MySQL - index

Deep learning notes - object detection and dataset + anchor box

Basic concepts of multithreading (concurrency and parallelism, threads and processes) and entry cases
![[database] MySQL basic operation (basic operation ~)](/img/0c/a8d858fa74ffed2a266ca77c783c7f.png)
[database] MySQL basic operation (basic operation ~)
随机推荐
Making message board with PHP + MySQL
[winui3] write an imitation Explorer file manager
[2021] Spatio-Temporal Graph Contrastive Learning
PHP counts the number of files in the specified folder
The programmer starts the required application with one click of window bat
Informatics Olympiad 1955: [11noip popularization group] Swiss round | openjudge 4.1 4363: Swiss round | Luogu p1309 [noip2011 popularization group] Swiss round
直播带货表格模板-自动显示图片-自动关联系列商品
[winui3] Écrivez une copie du gestionnaire de fichiers Explorer
View analysis of scenic spots in ArcGIS
Teach you how to build the ruoyi system by Tencent cloud
Innovation training (VII) FBV view & CBV view
Sword finger offer: symmetric binary tree (recursive iteration leetcode 101)
Informatics Aosai yibentong 1212: letters | openjudge 2.5 156: Letters
What's the difference between error and exception
POI export message list (including pictures)
Field injection is not recommended using @ Autowired
The 8 diagrams let you see the execution sequence of async / await and promise step by step
ApplicationContext injection bean
Day. JS common methods
持续集成(CI)/持续交付(CD)如何彻底改变自动化测试