win7升级到win10,出现算术运算溢出问题

前台winform,后台java代码是:

OutputStream ou=(OutputStream)response.getOutputStream();

ou.write(rightSet.getRight(user, fund,type,role).getBytes(YssCons.ENCODING));

当rightSet.getRight(user, fund,type,role)返回为空时,

win7,前台返回http.responseBody为null,

XMLHTTP http = new XMLHTTP();

if (http.status != 200)
{
throw new ClsException("(" + http.status + ")" + (http.status == 404 ? "找不到或无法访问" : "") + http.statusText);
}
else if (http.responseBody != null)
{
//l_ReturnObject =Decompression((Stream)new MemoryStream((byte[])http.responseBody)); 
l_ReturnObject = encode((byte[])http.responseBody, encoding);
}

win10,前台返回http.responseBody为byte[0](空数组),

因此,导致l_ReturnObject 返回"",出现了异常。

猜你喜欢

转载自www.cnblogs.com/dulianyong/p/9952624.html