提交 a6661f15 编写于 作者: K kohsuke

Plugin installation / Hudson upgrade are made more robust in the face of...

Plugin installation / Hudson upgrade are made more robust in the face of possible connection abortion.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20749 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6c2c917d
......@@ -583,6 +583,13 @@ public class UpdateCenter extends AbstractModelObject {
in.close();
out.close();
if (total!=-1 && total!=tmp.length()) {
// don't know exactly how this happens, but report like
// http://www.ashlux.com/wordpress/2009/08/14/hudson-and-the-sonar-plugin-fail-maveninstallation-nosuchmethoderror/
// indicates that this kind of inconsistency can happen. So let's be defensive
throw new IOException("Inconsistent file length: expected "+total+" but only got "+tmp.length());
}
return tmp;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册