日期:2014-05-20  浏览次数:20632 次

维护功能,看到代码无限头疼
Java code

public Map getMenuAccessMap(long userId) {

    if (new Long(userId) == null || "".equals(userId)) {
        throw new NullObjectException("用户Id不能为空");
    }



你们有什么想说的?

------解决方案--------------------
坑爹的代码
------解决方案--------------------
new Long(userId) == null这永远都不成立
"".equals(userId)判断long为空字符串,这哥们可真有想象力