当前位置:网站首页>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边栏推荐
- Class selectors and using pseudo class selectors with
- Is the acceptance standard a test case?
- Unable to load dynamic library ‘oci8_ 12C 'or unable to load dynamic library' PDO_ OCI 'or cannot find module
- Circuitbreaker fuse of resilience4j -- Measurement of circuitbreakermetrics index
- Circuitbreaker fuse of resilience4j - circuitbreakerregistry register
- [Wayland] Weston multi screen display
- Malicious code analysis practice - lab03-02 DLL analysis
- Solution to invalid small program scroll into view
- 浅谈调和形状上下文特征HSC对3DSC的改进
- Download Notepad++
猜你喜欢

2. factory mode

Leetcdoe 2037. 使每位学生都有座位的最少移动次数(可以,一次过)

Circuitbreaker fuse of resilience4j - circuitbreakerevent event

pycharm 查看opencv当前的版本

CONDA install tensorflow test tensorflow

Leetcode 2169. 得到 0 的操作数

Pseudo static setting of access database in win2008 R2 iis7.5

2022京东618预售定金怎么退?京东618定金能退吗?

性能指标的信仰危机

Is the acceptance standard a test case?
随机推荐
A hundred secrets and a few secrets - Caesar encryption
Global and local existence of array, integer and character variables
PHP interface generates cache and MD5 encryption uniformly
Chapter 3 search
[MySQL] learn more about the clustered indexes and auxiliary indexes (b+ tree indexes) in InnoDB
Mysql5.6.24 installation free deployment method
Machine learning is not something you can use if you want to use it
A snare - Cookie spoofing
MySQL injection load_ File common path
Propagation of transactions
PHP generate schedule
Assign a specified amount to a specified number of people at random
Binassii module - converting between binary and ASCII
Leetcode 2169. Get operands of 0
【MySQL】sql_ Model mode
Golang start service background daemon
Dynamic proxy
JS string combination
Win10 professional edition user name modification
PLC如何自行构造移位功能块(FC)
