Fix updateApi to correctly write ignore files
bug:70031801
Test: ./gradlew updateApi
Change-Id: I50068168375522b4f521ec0659a187f3a1f2fd1a
diff --git a/buildSrc/src/main/java/android/support/checkapi/UpdateApiTask.java b/buildSrc/src/main/java/android/support/checkapi/UpdateApiTask.java
index de2db91..15e9104 100644
--- a/buildSrc/src/main/java/android/support/checkapi/UpdateApiTask.java
+++ b/buildSrc/src/main/java/android/support/checkapi/UpdateApiTask.java
@@ -29,7 +29,6 @@
import java.io.File;
import java.nio.charset.Charset;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
/**
@@ -120,11 +119,6 @@
}
if (mWhitelistErrorsFile != null && !mWhitelistErrors.isEmpty()) {
- if (mWhitelistErrorsFile.exists()) {
- List<String> lines =
- Files.readLines(mWhitelistErrorsFile, Charset.defaultCharset());
- mWhitelistErrors.removeAll(lines);
- }
try (BufferedWriter writer = Files.newWriter(
mWhitelistErrorsFile, Charset.defaultCharset())) {
for (String error : mWhitelistErrors) {