当前位置:网站首页>Why check the @nonnull annotation at run time- Why @Nonnull annotation checked at runtime?
Why check the @nonnull annotation at run time- Why @Nonnull annotation checked at runtime?
2022-06-12 10:36:00 【javail】
problem :
I have a function with following signature I have a function with the following signature
public static String myFunction(@Nonnull String param)When I call it with param as null, I get the following exception: When I use param Call it as null when , I got the following exception :
Caused by: java.lang.IllegalArgumentException: Argument for @Nonnull parameter 'param' of com/MyClass.myFunction must not be null at com.MyClass.$$$reportNull$$$0(MyClass.java) javax.annotation.Nonnull supposed not to be checked at runtime. You should not check at run time javax.annotation.Nonnull.
Who actually throws the exception and why? Who really throws an exception , Why? ?
PS I run Tomcat server in debug mode from IntelliJ IDEA 2016.3 with Oracle JDK 1.8.0_102PS I use Oracle JDK 1.8.0_102 from IntelliJ IDEA 2016.3 Run in debug mode Tomcat The server
Solution :
Reference resources : https://stackoom.com/en/question/2lOIC边栏推荐
- JS obtains the time period of this week and last week (one time period is from Monday to Sunday)
- 数组,整型,字符变量在全局和局部的存在形式
- Pseudo static setting of access database in win2008 R2 iis7.5
- 93. obtain all IP addresses of the Intranet
- Leetcode2154. 将找到的值乘以 2(二分查找)
- PHP occupies memory
- Propagation of transactions
- properties中文乱码
- Malicious code analysis practice - lab03-02 DLL analysis
- 2022淘宝618超级喵运会怎么玩?2022淘宝618喵运会玩法技巧
猜你喜欢

Circuitbreaker fuse of resilience4j - circuitbreakerregistry register

Leetcode2154. 将找到的值乘以 2(二分查找)

MYSQL用户与权限管理,角色管理

The solution of Lenovo notebook ThinkPad t440 WiFi unable to connect to the Internet

ASP.NET Core权限系统实战(零)

ASP. Net core permission system practice (zero)

2022淘宝618超级喵运会怎么玩?2022淘宝618喵运会玩法技巧

Add jar package under idea2018 web project

Pagoda chevereto1.6.2 the latest version of stepping on the pit tutorial in Chinese

验收标准到底是不是测试用例?
随机推荐
MySQL user and permission management, role management
file_ get_ Contents() JSON after reading_ Decode cannot be converted to array
2. factory mode
Get start date and end date for all quarters of the year
How PLC constructs shift function block (FC) by itself
Tp6+memcached configuration
The name of a great man
XML Parsing Error: mismatched tag. Expected
Timers in golang
MySQL implements split method
学生管理系统
MYSQL用户与权限管理,角色管理
CONDA install tensorflow test tensorflow
PHP curl function
PHP download station B video
PHP specifies the number of people to distribute the specified amount equally at random (scaling method)
MQTT 协议中文版
Find the location of a function in PHP
4. creator mode
Is the acceptance standard a test case?
