mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 23:25:52 +00:00
[FIXED JENKINS-8686]
As I mentioned in the comment, I doubt if this makes any behaviour change, but this seems like a sensible defensive measure that wouldn't hurt.
This commit is contained in:
1 parent
548373fad1
commit
dc94b7d063
5 files changed
+7
-7
No files matched your search
@@ -451,7 +451,7 @@ public class Util {
|
||||
public static void copyStream(InputStream in,OutputStream out) throws IOException {
|
||||
byte[] buf = new byte[8192];
|
||||
int len;
|
||||
while((len=in.read(buf))>0)
|
||||
while((len=in.read(buf))>=0)
|
||||
out.write(buf,0,len);
|
||||
}
|
||||
|
||||
@@ -562,7 +562,7 @@ public class Util {
|
||||
byte[] buffer = new byte[1024];
|
||||
DigestInputStream in =new DigestInputStream(source,md5);
|
||||
try {
|
||||
while(in.read(buffer)>0)
|
||||
while(in.read(buffer)>=0)
|
||||
; // simply discard the input
|
||||
} finally {
|
||||
in.close();
|
||||
|
||||
Reference in new issue
Block a user