HBASE-10593 FileInputStream in JenkinsHash#main() is never closed
This commit is contained in:
parent
961919d443
commit
b436d20d5c
|
@ -253,9 +253,13 @@ public class JenkinsHash extends Hash {
|
|||
byte[] bytes = new byte[512];
|
||||
int value = 0;
|
||||
JenkinsHash hash = new JenkinsHash();
|
||||
try {
|
||||
for (int length = in.read(bytes); length > 0; length = in.read(bytes)) {
|
||||
value = hash.hash(bytes, length, value);
|
||||
}
|
||||
} finally {
|
||||
in.close();
|
||||
}
|
||||
System.out.println(Math.abs(value));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue