提交 ff3d2870 编写于 作者: C Christoph Kutzinski 提交者: Kohsuke Kawaguchi

don't create a new buffer for each loop iteration

上级 3c09a0c4
......@@ -521,9 +521,10 @@ public class Util {
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
byte[] buffer = new byte[1024];
DigestInputStream in =new DigestInputStream(source,md5);
try {
while(in.read(new byte[1024])>0)
while(in.read(buffer)>0)
; // simply discard the input
} finally {
in.close();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册