当前位置:网站首页>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
边栏推荐
- 持续集成(CI)/持续交付(CD)如何彻底改变自动化测试
- Deep learning notes - semantic segmentation and data sets
- Unity攝像頭跟隨鼠標旋轉
- MySQL time function query
- Learning Android II from scratch - activity
- The 2021 more reading report was released, and the book consumption potential of post-95 and Post-00 rose
- The 8 diagrams let you see the execution sequence of async / await and promise step by step
- Spell it! Two A-level universities and six B-level universities have abolished master's degree programs in software engineering!
- Informatics Aosai yibentong 1212: letters | openjudge 2.5 156: Letters
- 什么是指令周期,机器周期,和时钟周期?
猜你喜欢
DIY 一个 Excel 版的子网计算器
Excel uses the functions of replacement, sorting and filling to comprehensively sort out financial data
[winui3] write an imitation Explorer file manager
Basic concepts of multithreading (concurrency and parallelism, threads and processes) and entry cases
COM in wine (2) -- basic code analysis
[database] MySQL multi table query (I)
Use the built-in function of win to transfer files between two computers in the same LAN (the speed is the same as that between local disks)
Field injection is not recommended using @ Autowired
AQS源码阅读
Painless upgrade of pixel series
随机推荐
What are instruction cycles, machine cycles, and clock cycles?
直播带货表格模板-自动显示图片-自动关联系列商品
L2-011 play binary tree (build tree + BFS)
Opencv + clion face recognition + face model training
vscode ipynb文件没有代码高亮和代码补全解决方法
getprop 属性
Unity rawimage background seamlessly connected mobile
ApplicationContext injection bean
Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]
SCP command details
Sword finger offer: the median in the data stream (priority queue large top heap small top heap leetcode 295)
How can continuous integration (CI) / continuous delivery (CD) revolutionize automated testing
Excel protects worksheets and workbooks from damage
Introduction to raspberry pie 3B - system installation
2022/4/22
COM in wine (2) -- basic code analysis
Pixel 5 5g unlocking tutorial (including unlocking BL, installing edxposed and root)
Learning Android II from scratch - activity
Innovation training (IV) preliminary preparation - server
scp命令详解