![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java后台
wefrii
这个作者很懒,什么都没留下…
展开
-
List判断非空
有时候会遇到并不是List本身为空,List有1个元素。但这个元素是null即[null]的情况 public boolean isEmpty(List list) { if (list == null || list.size()==0) {//使用短路或。第一个条件判断对象是否存在,如果不存在,条件成立,则短路或情况下,第二个条件不执行,不会引发空指针;如果存在,条件不成立,则检查原创 2016-03-11 10:04:28 · 804 阅读 · 0 评论 -
float和Float的问题,错误原因:cannot be translated into a null value
今天遇到这个问题 java.lang.IllegalStateException: Optional float parameter 'gas_price' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it a原创 2016-03-04 16:03:01 · 2838 阅读 · 0 评论