关于null值的一个神坑的bug
起因:传的参数startDate是null,但是依旧可以进入if方法体中。
这种是失败的:
这种才行:
因为Null是字符串,吐血。。。
报的异常是:
续
网上搜索:
java.lang.NumberFormatException: For input string: "null"
http://blog.****.net/suyujiezhang/article/details/51492064
这个问题应该早搜索的,欸,很简单一直调试以为见鬼了。