提交 6554f5a3 编写于 作者: K kohsuke

[FIXED HUDSON-3134]

Finally found the cause of this problem. This was due to the wrong sign bit expansion.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16174 71c3de6d-444a-0410-be80-ed276b4c234a
上级 360f0950
......@@ -57,7 +57,9 @@ final class ProxyInputStream extends InputStream {
try {
Buffer buf = new Chunk(oid, 1).call(channel);
if(buf.len==1)
return buf.buf[0];
// byte->int expansion needs to be done carefully becaue byte in Java is signed
// whose idea was it to make byte signed, anyway!?
return ((int)buf.buf[0])&0xFF;
else
return -1;
} catch (InterruptedException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册