yangyichao-mango commented on issue #3471: URL: https://github.com/apache/incubator-dolphinscheduler/issues/3471#issuecomment-672648499
> 1.JsonUitls.toMap (string JSON) the parameter values are checked for null both inside and outside the method, and the code is repeated. > > 1. JsonUitls.toMap(String json) 针对参数值在方法内和方法外都进行校验空,进行了2遍校验,代码是重复的。 OK, I think double check is just an extra layer of protection. If it can guarantee that NPE will not occur, I think it is OK to remove the outer null check. ------- Ok,我只是觉得double check只是多了一层防护,如果能保障不会出现npe的情况,我觉得去除外层check也是可以的。 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
