HDDS-1886. Use ArrayList#clear to address audit failure scenario

Signed-off-by: Anu Engineer <aengineer@apache.org>
This commit is contained in:
dchitlangia 2019-08-01 02:06:03 -04:00 committed by Anu Engineer
parent 2ac029b949
commit 689a80d3ce

View File

@ -153,7 +153,7 @@ private void verifyLog(String expected) throws IOException {
assertTrue(lines.size() != 0);
assertTrue(expected.equalsIgnoreCase(lines.get(0)));
//empty the file
lines.remove(0);
lines.clear();
FileUtils.writeLines(file, lines, false);
}